Solved

Facebook - API and Steam.Publish

Posted on 2011-09-11
5
475 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:
ingwa 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

776 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