开发者

Access Facebook App's Main Account Wall

We created an application profile using our company's Facebook account. Today, I've just finished integrating the application login, user login and also able to get user's info using oAuth and Graph API. Now I'm in the process of integrating Wall posts to one of our pages in开发者_如何转开发 order to encourage interaction between members. As I do that I noticed that I was fetching our Application Profile's Wall Posts instead of the Main Account.

QUESTION:

Is it possible for me to fetch and write to our FB Main Account's Wall instead of the our App's Wall?

Thanks in advanced.


You can publish to your account's wall, to your application's wall or to the wall of any user who has authorized you to do it... Url is https://graph.facebook.com/YOUR-PROFILE/feed

Is your account a "personnal account" or a "business account" (see the "official" difference in the Facebook help)?


I actually figured out how to do it. For the benefit of the inclined, here is how I worked it out:

  1. Set login button to request the following extended permissions:

    $this->facebook->getLoginUrl(array('req_perms' => 'email,sms,read_stream,publish_stream'))

  2. Click the login button, sign-in USING YOUR MAIN ACCOUNT'S EMAIL AND PASSWORD then click the 'Allow' button to grant extended permission to access and write to your account's wall.

  3. Take note of your Main Account's Facebook ID.
  4. Perform your requests like any other regular account:

    https://graph.facebook.com/MyMainAccountID-DoNotClickMeIWontWork/feed?access_token=1234567890|51bc7e65851d8ec74c381171-0484756|x_3x79iy3VU8Wr9qytDqV-BWXa1

The only remaining problem I trying to figure out is that I can't seem to retrieve the feeds when no user is logged in even with a valid valid app token.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜