want to share a link from my application in windows phone 7. Any one know a good API library for this.....I have downloaded a API from a site which shows null information like this
Usage
1. Create a button that sends the user to a page where the login process will start like LinkedInBeginAuth.aspx or Account/LinkedInBeginAuth in MVC
2.Inside LinkedInBeginAuth Page add the following code
Create the page that the user will be redirected after login
Inside that page add
5.That's it!
Library is in EARLY development so expect major changes. Use it wisely.
Have you looked at the ShareStatusTask :-
http://msdn.microsoft.com/en-us/library/hh394027(v=VS.92).aspx
If you want to use the LinkedIn API you'll need to connect via OAuth. (You can do this with Hammock & a WebBrowser control.)
Once connected you can call their REST API.
Alternatively, or possibly as a starting point, you could look at http://linkedintoolkit.codeplex.com/ but it doesn't look complete.
Related
I am working on UWP app which requires users to login using social identity providers like Microsoft, Google etc.
I have followed the quickstart guide here which describes how the authentication can be added.
In the UWP Quickstart app the installed version of Microsoft.Azure.Mobile.Client is 3.1.0, if I upgrade this to the latest version i.e. 4.0.0, an error is thrown on the line LoginAsync(MobileServiceAuthenticationProvider.MicrosoftAccount) that LoginAsync has no overloaded methods that take 1 argument. To resolve this I added a SingleSignOn parameter to the method which is a boolean
var user = await App.MobileService.LoginAsync(MobileServiceAuthenticationProvider.MicrosoftAccount, true);
When I run the application the Microsoft login popup is shown successfully, however when the users logs in, the popup does not go away and control never returns to the app. Following is the screenshot:
If I close the popup manually then an exception is thrown :
Authentication was cancelled by the user
So is this a Microsoft.Azure.Mobile.Client Nuget package version issue or am I missing something here.
Any help would be much appreciated.
Ok, I'll answer to you question now, because I was able to solve it just a couple seconds ago.
So you are using UWP, I'm using Template 10 and I've been able to make it work on both, firstable update to v4.0.0 or v4.0.1 according to what i found out was because google authentication stopped allowing web views for authentication and the concern for Azure-Mobile-Net-Client team was that all OAuth provider would adopt that behavior in the future base on an article that you can find here if you are interested:
Modernizing OAuth interactions in Native Apps for Better Usability and Security
after this being said we are in the middle of a big change here, so in order to make it work you need to set your mobile app service to allow external redirects using url_scheme_of_your_app as shown on microsoft documentations tutorial.
So the step are the next ones:
1.- Go to Azure Portal
2.- Go to your MobileApp Service
3.- Choose Authentication/Authorization
4.- at Allowed External Redirect URLs write this: {urischeme}://easyauth.callback
(meaning that urischeme must be alphanumeric word beginning with a letter).
5.- Save changes.
Now after you have done that now you gotta work on your client
then if you are using UWP follow this tutorial:
Add Authentication to your UWP.
and that should be enough, if you are using template 10 all you gotta do is at OnStartAsync Method use this code:
if(startKind == StartKind.Activate)
{
ProtocolActivatedEventArgs protocolArgs = args as ProtocolActivatedEventArgs;
cloudService.ResumeWithUrl(protocolArgs.Uri);
}
you saved tons of code at the tutorial because you gotta write code at OnNavigatedTo() Method and at OnActivated() method at App.Xaml.cs
thats for the architecture in UWP and at Template 10 that acts like a wrapper of Application class and simplifies its usage.
Hopefully this helps you, also you will notice that when you first sign in at your app using urischeme it opens your default browser and stays open after successfully logged in.
Also singlesignon overload method doesnt work at all yet, they are still working on those issues.
hopefully my answer helps you!!!
I just wanted to add my solution for xamarin.forms on uwp, which should be actually same as we are doing redirecting and login on native level. I followed this article https://learn.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-users
but there was something confusing about url scheme of your app part when you define the return url.
Basically you define return url in 4 places and they sound like the same but they are different
1) you define on facebook developer page. it should (use https) https://myapi.azurewebsites.net//easyauth.callback
2) on the azure portal for allowed external redirect urls
add here 2: https://myapi.azurewebsites.net//easyauth.callback, myapp//easyauth.callback
3) uwp package manifest- declaration. add myapp as name
4) Login call to azure mobile services: Client.LoginAsync(provider, "myapp");
So basically myapp (this is name you choose) should be available in azure portal and same name used in your uwp project. otherwise even login is successful, you end up with this screen instead of redirected back to the app.
I have an MVC web app with an API backend. I have an exe which polls the API every x minutes to retrieve some informaton. I have that portion working, however I want to extend this functionality a bit. I want the user to be able to click on the winform that pops up and then have the user automatically be directed to the website to a special page which shows details about the pop up (basically it's retrieving some info of an event)....I can do a simple Process.Start() to the website however the website needs authentication.
The web app has standard OWIN authentication...now my question is how I can automatically have some sort of authentication passed into this Process.Start() where by I can automatically login.
It basically hits an "Account" controller....I was able to simulate what I wanted (automatic authentication) via Postman but it didn't work on the Winform app.
Is there any other way to do this?
I can post some code if needed.
When doing things like this in the past I have opted to generate a GUID and place it in my db, then use that GUID with whatever extra information it needs to authenticate my user. I don't know how this falls into your security requirements however.
I've been playing around with Facebook JavaScript SDK and Facebook SDK for .NET (Web) to try and create a simple Page tab app which does the below:
Show welcome page
If user likes the page, ask for proper extended permissions and redirect to another page reserved for fans only
Use the access token from the login to do things on the user behalf.
Anyway, my problem is with the logic of the whole thing, as the user enters the page what should I do after loading the JS SDK? It automatically shows the permissions box so that I could get the extended permissions user_likes instead of showing the welcome page.
My other issue is with the access token that is going to be used later in time. Should i store it in session state? if yes, how? What happens if i try to access it and it's expired?
I know this is a general question but please could someone guide me through the best practices to initialize and use the facebook SDK in a .NET WebForms tab app?
Thanks a lot.
(I've read through both docs on Facebook and C# SDK. Great for browsing the API but not much documentations or examples about .NET WebForms)
new to facebook dev and I have read the basics to get a site up and running using the canvas setup. Nice and simple, I have also got the integration with users working ok (i.e. the signed_request).
I was wondering how it works with "sending/posting" data from one site that is anonymous (my own external to facebook) to the facebook site.
The flow I'm after is a user is looking at some content my site A (my own external site) and then clicks the "share on facebook" button (or whatever), which sends the user (and the data they were looking at) to the site B (my facebook app) to which they authenticate and then (and this is the part I dont get) can see that content on their personalised homepage within site B.
So is there a way to POST some kind of data to the facebook site? Or do I need to do something else here?
Thanks a lot.
You use the facebook API located here:
http://github.com/facebook/csharp-sdk
The .zip download includes the api that you can compile, as well as a sample project that uses it.
Reference: http://developers.facebook.com/blog/post/395/
EDIT
Here is some more info regarding the facebook graph api. I think you'll find everything you need in here: http://developers.facebook.com/docs/reference/api/
I’ve been asked to integrate a windows form application with SagePay to take payments directly from the application. The SagePay documentation talks about ASP.NET so I’m not sure whether this is possible. Has anyone integrated a WinForm application with SagePay before? Is it possible?
I know some payment processors have a connection option where the payment part is hosted on a form on their server. You could try embedding a web browser control into your app to display the payment page.
Usually there is another type of connection option where you can send your information via HttpWebRequest, but I'm not sure that this would work as it requires SSL. Since you are running your app as a desktop client, I'm not sure what you would have available.
I am not sure this is possible given that sagepay needs to redirect users to Mastercard securecode or Verified by Visa, I think they would need to redirect to the bank which then redirects back to a supplied URL. I would think this needs to be within a browser environment.
You can post to urls and get back a response via .net objects and parse the results to display on a form.
You can also ask SagePay to create a Vendor account with 3d secure switched off. This allows you to take payments in house in your winforms app without the customers password however most card vendors if you bypass 3d secure will not protect you if someone calls and uses a card fraudulently.
However it can definitely be done.
You can normally post to secure servers from non secure pages so again this isn't usually an issue.