Azure mobile service and Native Android Facebook Auth

ZenDroidZenDroid USMember ✭✭✭

I use Azure mobile service and native android app. In my app service: - I enabled app service auth - I add facebook appId and app secret When I open redirect url (ex. https://myapp.azurewebsites.net/.auth/login/facebook/callback) than I see the message:

"You have successfully signed in"

Now I need to log in to my app(Xamarin Android) with Native Facebook Sdk. As an example I use this article. This is source code for this article on GitHub. Authorization passes and I get FacebookAccessToken. Now I'm trying to log in with this when in my service:

var token = new JObject();
token["access_token"] = Settings.FacebookAccessToken;
var user = await Client.LoginAsync(MobileServiceAuthenticationProvider.Facebook, token);

But I get an exception:

I/mono-stdout( 3982): 
Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException:    
You do not have permission to view this directory or page.     
Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: 
You do not have permission to view this directory or page.

Any ideas and suggestions about what is the cause of this error. Perhaps another solution will work for my task - I will be grateful for any help.

Posts

  • ElvisXiaElvisXia Member, Forum Administrator, Xamarin Team Xamurai
    edited July 2018

    Hi,
    @ZenDroid does the issue still exists? If so, could you please post your implementation of MobileServiceClient ? You can remove any sensitive information in that implementation.

Sign In or Register to comment.