Jump to content

A little help needed with my code


Recommended Posts



I have successfully made a script that will upload images to the album of my facebook page easily. Following is the link to that script


Now when i used the same script to upload status directly to my wall then the script is doing nothing kindly let me know what is the problem with my code


//posting to the page wall
$attachment = array('message' => 'this is my message',
                'access_token'  => $access_token,
                'name' => 'This is my demo Facebook application!',
                'caption' => "Caption of the Post",
                'description' => 'this is a description',
                'picture' => 'http://radiations3.com/images/logo.png',
$status = $facebook->api('/194458563914948/feed', 'POST', $attachment);   // my page id =123456789

Link to comment
Share on other sites

var_dump() your array to make sure no values are null. facebooks api might reject your array if your access token is incorrect or null, everything else is manually added text so that's fine.

since your code is just an array and a variable storing whatever data is returned from $facebook->api then there isn't much to check. Do what I first said and make sure the data in the $facebook->api function is correct. I'm sure you'll need to check their documentation for the api. Also make sure the data you prepare is your $attachment array fits all of $facebook->api needs.

Link to comment
Share on other sites

My New issue of facebook:

Now i am facing the issue of token can anyone please let me know how to get a permanent token or allow the access to every one cause every time i have to generate my token put it into my script then any one can post on the behalf of my token on FACEBOOK

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.