开发者

How to let users connect their Fb pages to my website?

I use the Facebook C# SDK, and the Javascript SDK (OAuth2). I handle my own "authentication" like so:

fbApp = new FacebookApp();
if (fbApp.Session != null) {
  // get profile from db, if no profile, create it
} else {
  // the user isn't logged into facebook
}

Works great. What I want to do next is let members connect in Facebook pages they are admin of. I want to have a button they click, which launches a window, they select the page to give permissions to, 开发者_开发问答click OK, done. From then on, my app can post to their page wall, etc...

What do I need to store in the DB to maintain that "connection"? For some reason I can't wrap my mind around this... thanks in advance!


The owned pages you can request with "/me/accounts" https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Faccounts

But you need the permission "manage_pages" of the User to get the acess_token of the page. https://developers.facebook.com/docs/reference/api/page/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜