Post to facebook on behalf of the user using access token in xamarin.forms

I build Xamarin.Forms App using this tutorial: and I choose .NET back end.

and also implement authentication using this:

while choosing Facebook as my authentication provider.

My question is, how can I post on facebook on behalf of the user using the access token that I got from the "MobileServiceUser"? I saw that it has a property called "MobileServiceAuthenticationToken" and I tried to use that token as a access token and create a FacebookClient using the Facebook sdk and that code:

FacebookClient fb = new FacebookClient(user.MobileServiceAuthenticationToken); string myMessage = "Hello";

fb.PostTaskAsync("me/feed", new { message = myMessage });

but no luck , can anyone help and see my mistake ?

Sign In or Register to comment.