views:

52

answers:

1

hi i want post tweets into facebook using php curl ,

this is my snippet i used for posting tweet into FB ,

FB CURL SNIPPET

But i am not find any updated tweet in my facebook ,

am not sure but i thing somthing goes wrong,

can u tell me,

snippet is correct one or not ,

Thanks

A: 

This calls for debugging.

First port of call: It could be that the cookies are not saved: Check whether the script actually generates a my_cookies.txt file. If it doesn't, create an empty one and do a chmod 777 on it.

Second port of call: curl_error().

Replace every curl_exec() call in the snippet by this:

$success = curl_exec(....... your options .....);

if (!$success) echo "CURL Error: ".curl_error();

this might give you some pointers as to what goes wrong.

However, seeing as the script tries to imitate a browser instead of using an API, it could be that the structure of the submission form has changed on Facebooks's side, in which case you'll have to parse the output cURL gives you and see what goes wrong.

All in all, if there is any way to do this cleanly through an API - I don't know whether there is - it would be much preferable to this.

Pekka
my updated snippet but no luck in that http://pastebin.com/yKqb91yR
Bharanikumar
Well, what did you update and why? What happens?
Pekka
just i added about curl_error functions
Bharanikumar
@Bharanikumar well, if that doesn't output anything, then you'll have to start looking at the data that Facebook returns.
Pekka