Jump to content

A little help needed with my code


radiations3

Recommended Posts

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);

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 thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.