-1

I have a question, It might be found somewhere but I couldnt find a thread for it so if there is one, please post the link.

I admin a page that is a group of several other business areas. I want to post on one page with different icons and names, can that be done? Like different admins but administered by one person/account?

Possible?

Lix
  • 47,311
  • 12
  • 103
  • 131
  • I'm having difficulties understanding exactly what you are trying to achieve.. You want to post to a page as a user? as an administrator? Please could you provide some more information and describe the scenario. – Lix Feb 02 '12 at 12:44
  • Sorry, My english is a bit rough. – Lars Lundberg Feb 06 '12 at 09:55
  • I want to post as an administrator, or different administrators. Lets say I have 6 different administrator profiles (names, and logo) that can post the same wall? – Lars Lundberg Feb 06 '12 at 09:56
  • Do you want to post as the **page**? – Lix Feb 06 '12 at 09:58

1 Answers1

0

What you are going to want to do is use a "Page access_token". To get this you will have to create an application and grant it the manage_pages permission.

You should see in the Authentication Documentation a section called "Page Login".
You can grant your application the manage_pages permission by going to this URL:

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=manage_pages&response_type=token

Don't forget to substitute YOUR_APP_ID and YOUR_URL with the correct values for you application and URL. (the URL can be any URL - it is where Facebook will send you after you close the Dialog). You will see a dialog that looks something like this :


(source: facebook.com)

Once you have the correct permission, you'll want to make a call to this URL :

https://graph.facebook.com/me/accounts?access_token=TOKEN_FROM_ABOVE

You will get a response similar to :


(source: facebook.com)

As you can see from the image, you will receive a list of all the pages that the user administers along with an access_token for each page.
You use this access_token to make posts on behalf of the page. Since you have not stated what programming language you are using I will give an example in . In , posting to the page would look something like this :

$facebook->setAccessToken(ACCESS_TOKEN_YOU_RETRIEVED_EARLIER);

$attachment = array('message' => 'this is my message',
                'name' => 'This is my demo Facebook application!',
                'caption' => "Caption of the Post",
                'link' => 'http://mylink.com',
                'description' => 'this is a description',
                'picture' => 'http://example.com/pic.gif',
                'actions' => array(array('name' => 'Get Search',
                                  'link' => 'http://www.google.com'))
                );


$result = $facebook->api('/PAGE_ID/','post',$attachment);

Hope this helps!
Happy coding!

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Lix
  • 47,311
  • 12
  • 103
  • 131