php - Facebook wall post -
i use below code post on friends wall.
$facebook->api('/'.$item.'/feed?'.$token,'post',$attachment);
it works post on wall shows name , photo.
how can show photo , name in post????
this how generate token:
$ch = curl_init(); curl_setopt($ch, curlopt_url, 'https://graph.facebook.com/oauth/access_token?client_id='.app_id.'&client_secret='.app_secret.'&redirect_uri=http://www.facebook.com/pages/cosmetics/167231286678063?sk=app_233227910028874&grant_type=client_credentials'); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_httpauth, curlauth_basic); curl_setopt($ch, curlopt_ssl_verifyhost,0); curl_setopt($ch, curlopt_ssl_verifypeer,0); $token = curl_exec($ch);
you should set authentications token 1 generated using login details.
you have set access token before can evoke api eg: $facebook->setaccesstoken($token);
token created when user logs in app. user author of posts made api.
Comments
Post a Comment