Reputation: 218
I am trying to fetch the full profile link of Linked-In user in my Windows phone application. I have tried this code
String _callbackUrl = "http://s-1-15-2-4033853409-3415519866-2771870237-856776843-3981727777-3206545648-3028839714";
String _consumerKey = "75wtr84mz6uwed";
String _scope = "r_fullprofile";
String _authorizationCode;
var url = "https://www.linkedin.com/uas/oauth2/authorization?response_type=code"
+ "&client_id=" + _consumerKey
+ "&scope=" + Uri.EscapeDataString(_scope)
+ "&state=STATE"
+ "&redirect_uri="
+ Uri.EscapeDataString(_callbackUrl);
// log(url);
var startUri = new Uri(url);
var endUri = new Uri(_callbackUrl);
WebAuthenticationBroker.AuthenticateAndContinue(startUri);
But after calling AuthenticateAndContinue
I see a blank screen, and after that it automatically reverts back to the application page
Where am I going wrong?
Upvotes: 1
Views: 112
Reputation: 3374
LinkedIn's servers won't be able to resolve that _callbackUrl
value to send the authorization code back to you.
You need to use a static server value, that you have configured in your LinkedIn application's valid list of callback sources. Unfortunately, there is no native SDK to facilitate authentication with LinkedIn on the Windows Phone platform at this time - only Android and iOS.
Upvotes: 1