radiations3 Posted April 13, 2012 Share Posted April 13, 2012 Hello, 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 http://radiations3.com/facebook/facebook_upload.php 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 var_dump($status); Quote Link to comment https://forums.phpfreaks.com/topic/260850-a-little-help-needed-with-my-code/ Share on other sites More sharing options...
creata.physics Posted April 13, 2012 Share Posted April 13, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/260850-a-little-help-needed-with-my-code/#findComment-1336942 Share on other sites More sharing options...
radiations3 Posted April 13, 2012 Author Share Posted April 13, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/260850-a-little-help-needed-with-my-code/#findComment-1337004 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.