0

I am building desktop application which should commit some stuffs from file system to Facebook. Application should not give user login form at all. C#, VS2010 are used.

I have for Facebook App:

  • client app id
  • client secret id
  • token (which is extended, so it is valid for next 60days).

Idea is to somehow renew the access_token, since Facebook doesn't give permanent access_token (offline_token). So I have tried this:

var fb = new FacebookClient();
dynamic results = fb.Get("oauth/access_token",
                            new
                            {
                                client_id = "aap_id",
                                client_secret = "secret_id",
                                grant_type = "fb_exchange_token",
                                fb_exchange_token = "existing_token"
                            });

String newToken =  results.access_token;

With this code I get newToken, which is different from existing.

My Question: If this code is run, lets say day before it is expired, will the new token be valid for new 60 days or not? Or should again be requested extended token?

Thanks, Ljiljana.

ljiljana
  • 1
  • 1
  • Please see this http://stackoverflow.com/questions/9345914/how-do-i-renew-a-facebook-user-access-token-if-i-deal-with-a-lot-of-ajax – Sergiy Kozachenko Jul 10 '13 at 12:04
  • @Grievoushead thank you on link. I am making WinService so how I can check if access_token can be renewed somehow. I am not sure if code mentioned in first post can do it. – ljiljana Jul 11 '13 at 07:16

0 Answers0