0
votes

I have been trying to create a wall post in the end of facebook app. I have done this about fifty times till now, but suddenly, facebook places other content to the wall post instead of the one i set. I use the php sdk to do the wall post and the code is:

$facebook->api(
    '/me/feed/',
    'post',
    array(
    'access_token' => $access_token, 
    'message'      => $message,
    'name'         => $name,
    'caption'      => $caption,
    'description'  => $description,
    'link'         => $my_url,                
    'picture'      => $wall_post_image
    )
); 

access_token and all other variables are tested and valid. The weird thing is that the wall post is being done having the right link to the app, but the name is the page name | app name, the picture is app icon and the caption is the company page description

Any ideas why this is happening?

1
obviously the data is getting tampered in between,facebook will post content what you will give to the graph api..which means you should echo and see are you passing the correct details and make sure there isn't another wall post script on the page.danish hashmi
i have tried this in any possible way i could think of.stavros
the variables have been tested and are correct. There is another script though, that post a photo to users photos. This is a replication of and older application i had created and was working fine. I also tried another application of mine (that was working until a week ago) and the result of the wall post was the same weird (faulty) post.stavros

1 Answers

0
votes

why dont you give them static value and see if it posts that,it might clear some confusion like

$facebook->api(
    '/me/feed/',
    'post',
    array(
    'access_token' => $access_token, 
    'message'      => 'testing message',
    'name'         => 'my name',
    'caption'      => 'testing caption',
    'description'  => 'testing description',
    'link'         => 'http://xyz.com/myurl.php',                
    'picture'      => 'http://xyz.com/linktoimage.jpg'
    )
); 

if this values are not posted it means that some other wall post function is working beside this and if it works than you were not passing proper value