function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
santhanamsanthanam 

Facebook Integration [while trying to post on facebook wall]

I hit a problem while trying to integrate with facebook.

 

While using stream.publish, the response message i got is: <error_msg>This API version is deprecated</error_msg>

 

 

// create the HTTP Request HttpRequest req = new HttpRequest(); //set the url to send the request req.setEndpoint('http://api.facebook.com/restserver.php'); req.setBody('method=stream.publish&message='+subjectLine); req.setMethod('POST'); system.debug('body of message at req.getEndpoint '+req.getEndpoint()); //create an HTTP object and use it to send the request Http http = new Http(); //send the request and get the response. HTTPResponse res = http.send(req); String resBody = res.getBody(); XmlStreamReader reader = new XmlStreamReader(resBody);

 

system.debug('The response is : '+resBody);

 

 

 

 

Is there any other method i am supposed to use?

 

I am trying to post a message in my "wall" in facebook. Can anyone help me out here?

 

Any kind of integration with facebook [which does not involve facebook toolkit as i am behind proxy and cant use it] and steps to do it will help me!

 

A similar post: http://community.salesforce.com/sforce/board/message?board.id=apex&message.id=16030

 

Thanks.
David VPDavid VP

If the facebook API is telling it's deprecated then I presume there should be a newer version available that replaces the (old) one that you're trying to call ?

 

David

santhanamsanthanam

Yes.

 

But, I could not find any alternative for it here, Face book API methods and here, Stream.publish

Also, the possible alternative i found, Feed.publishUserAction does not seem to help much.

 

 

Had posted this query in another thread, where i was told that since this method is in beta, it might not work.

Is it not working because it is beta or am i passing insufficient paramaters?

 

This is the complete response I got. Note that Error Code is 12. Does that tell something?

 

The response is : <?xml version="1.0" encoding="UTF-8"?>
<error_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd">
<error_code>12</error_code>
<error_msg>This API version is deprecated</error_msg>
<request_args list="true">
<arg>
<key>method</key>
<value>stream.publish</value>
</arg>
<arg>
<key>message</key>
<value>nokia 3600 slide problem</value>
</arg>
</request_args>
</error_response>

 

I am new to this. I have published as many info. possibile. May be some one can guide me in the right direction

 

Message Edited by santhanam on 06-15-2009 10:38 PM
David VPDavid VP

The problem is not in your Force.com code but with the Facebook API. It seems that they're still changing it and having some troubles in keeping it backward compatible ...

 

See also this thread :

http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=55959

 

You might want to take this to the facebook community. The method you're having trouble with is 'stream.publish'. Ask around there what's going on with that ....

santhanamsanthanam
Thank You very much  David VP :manhappy: