Search code examples
facebookfacebook-graph-apioauthfacebook-wall

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.


Solution

  • 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.