Solved

Facebook - API and Steam.Publish

Posted on 2011-09-11
5
478 Views
Last Modified: 2013-11-19
Hi,

I'm currently using this method of posting to my fan page from PHP:

$res = $facebook->api(array(
	'access_token' => 'access_token_here', 
	'method' => 'stream.publish', 
	'message' => 'message', 
	'uid' => 'fan_page_id_here'
));

Open in new window


However, according to this page: http://developers.facebook.com/docs/reference/rest/stream.publish/ the stream.publish method is being deprecated.

Can anyone offer help with an alternative using the new graph api that will accomplish the same thing, or will I be OK using the method I've already implemented?

The two important things that need to be considered is that whichever method is chosen I need to ensure the message appears to be created as if it's a normal message on the fan page, so the owner of the message is the page itself (not the personal user account) and that the message appears in followers news feed.

Thanks,

Matt
0
Comment
Question by:MattJellings
  • 2
5 Comments
 
LVL 18

Accepted Solution

by:
Mark Gilbert earned 500 total points
ID: 36552126
Here's the latest documentation for Pages, and how to interface with them:

http://developers.facebook.com/docs/reference/api/page/

Reading further into the article, there's 2 additional links:

http://facebook.stackoverflow.com/questions/691425/how-do-you-post-to-the-wall-on-a-facebook-page-not-profile
http://developers.facebook.com/blog/post/465

That I think you will find most helpful, which includes some PHP SDK sample code.

Hope this helps.
0
 
LVL 4

Author Comment

by:MattJellings
ID: 36569416
Hi inqwa,

Sorry for not getting back to you sooner, I've been rather busy lately.

I haven't had chance to test out some of the code posted on the URLs you provided however it definitely looks like it's what I need.  The Page object as detailed in the first URL looks like what I need to be using, along with using the correct URL to post to my fan page rather than my own wall.

The trick will be whether I can get the posts to appear as though from the fan page itself rather than my personal account.

I'll gladly accept your answer as the solution as I'm sure it will either provide me with the exact solution or will point me in the right direction.

Thanks for taking the time to read over my question and post your findings, it's much appreciated.

Also, thanks to the community mods for their support in helping me get a solution to this problem, you guys do a fantastic job and I just wanted to let you know it's appreciated.

Cheers all,

Matt
0
 
LVL 4

Author Closing Comment

by:MattJellings
ID: 36569419
Hi inqwa,

Sorry for not getting back to you sooner, I've been rather busy lately.

I haven't had chance to test out some of the code posted on the URLs you provided however it definitely looks like it's what I need.  The Page object as detailed in the first URL looks like what I need to be using, along with using the correct URL to post to my fan page rather than my own wall.

The trick will be whether I can get the posts to appear as though from the fan page itself rather than my personal account.

I'll gladly accept your answer as the solution as I'm sure it will either provide me with the exact solution or will point me in the right direction.

Thanks for taking the time to read over my question and post your findings, it's much appreciated.

Also, thanks to the community mods for their support in helping me get a solution to this problem, you guys do a fantastic job and I just wanted to let you know it's appreciated.

Cheers all,

Matt
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question