我有将图像上传到 Facebook 应用程序的 wcf 服务功能。 我如何为此目的获取授权码。我需要为以下用户 token 生成目的生成授权码。 如何生成授权码?
dynamic token = fb.Get("oauth/access_token", new
{
client_id = "104685639880509",
client_secret = "xxxxxxxxxxxxxxxxxxx",
redirect_uri = "http://localhost:50487/SRMPServiceApplication.svc",
code = "code"
});
最佳答案
从此链接生成扩展授权 token
https://developers.facebook.com/tools/accesstoken/
dynamic token = fb.Get("oauth/access_token", new
{
client_id = "104685639880509",
client_secret = "xxxxxxxxxxxxxxxxxxx",
grant_type = "fb_exchange_token",
fb_exchange_token = "your extended authorization token"
});
fb.AccessToken = token.access_token;
关于c# - 如何使用 wcf 服务获取 facebook 授权码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31715605/