renewing facebook's access token RRS feed

  • Question

  • Hello,

    Iam trying to Renew Facebook's Access Token with following code but I get a exception('System.Threading.Tasks.Task<object>' does not contain a definition for 'access_token') in following line

    oldToken = result.access_token;

    following is my code for renewing token

    public void GetExtendedAccessToken1(string oldToken) { FacebookClient facebookclient1 = new FacebookClient(App.AccessToken);

    facebookclient1.AppId = Constants.FacebookAppId; facebookclient1.AppSecret = Constants.FaceBookAppSecret; dynamic result = facebookclient1.GetTaskAsync("oauth/access_token?client_id=**********&client_secret=**********c&grant_type=fb_exchange_token&fb_exchange_token=" + oldToken); oldToken = result.access_token; // got exception here tb.Text = oldToken.ToString(); }

    Iam using Facebook C# SDK to implement this

    how I could fix it?

    here is the correct javascript code


    Santana George

    Friday, May 3, 2013 7:14 PM


All replies