Fermé

Facebook api small fix issue

I have a facebook application that post massages to my friends wall. In case one of my freinds has is wall privacy on in other words not allowing anyone to post massage to his wall than the script will stop sending. the eror is

Uncaught OAuthException: (#210) User not visible thrown in

the code is:

<?php

require_once('[url removed, login to view]');

//error_reporting(E_ALL); // display all errors (debug mode)

$friends = $facebook->api('/me/friends');//get friends array

$offset = 1; // start send from friend number ....

$limit = 10; // stop send after .... ( limit number of posts )

// build users list

$users_list = array();

for ($i=$offset, $n=count($friends['data']); $i < $n && $i < ($offset+$limit); $i++) {

$users_list[] = array(

"id" => $friends['data'][$i]['id'], // profile id

"name" => $friends['data'][$i]['name'] // friend name

);

}

// loop through list

for ($i=0, $n=count($users_list); $i<$n; $i++) {

$id = $users_list[$i]['id']; //get profile user id

$name = $users_list[$i]['name']; //get profile friend name

try {

$feed = '/'.$id.'/feed';

$link = $facebook->api($feed, 'post', array('link' =>$_POST['a'] )); // send the events link to user wall

?>

<table width=500 border=0 align=center cellpadding=0 cellspacing=0 summary="">

<tr>

<td style="font-size:12px;color:black;font-weight:bold;direction:rtl;text-align:right">

: <?echo $id , "-", $name; ?> - <img src="[url removed, login to view]<?echo $id;?>/picture">

<a href="[url removed, login to view]<?echo $id;?>"> </a><br></td>

</tr>

</table>

<?echo $id, "done :)";

} catch(FacebookApiException $e){

die($e);

// echo $id,"Your friend do not allow posts on his wall<br>";

}

}

?>

above code is working fine until it get to a user with privacy on. i would to have it fix that when the user have privacy on the scriot continue. what happan now the even if the user after the user with privacy on hase is wall posting privacy off than i stii get this user not visible eror

please note that the function continu instead of die is not the solution

thanks

hi;
please note that the solution is not the continue function instead of the die. just to verify:

friend no 1: post ok
friend no 2 in the loop - is not allowing post on his wall so the eror is on
friend no 3 in the loop - allowing post to his wall but get the same eror like friend no. 2

Compétences : PHP

Voir plus : uncaught oauthexception 210 user visible thrown, uncaught oauthexception 210 user visible, user visible thrown, oauthexception 210 user visible, fix uncaught oauthexception 210 user visible thrown, oauthexception 210 user visible thrown, facebook post user visible thrown, 210 user visible thrown, user visible thrown facebook php, uncaught oauthexception 210 user visible post friends wall, php facebook user visible 210, facebook user visible thrown, friends data name, uncaught oauthexception 210, oauthexception 210, www'facebook, what is profile id, what graph, send the massage, send a massage, post it graph, my fix com, list graph, link graph, http www facebook com

Concernant l'employeur :
( 17 commentaires ) Ramat Gan, Israel

N° du projet : #1069194

3 freelance ont fait une offre moyenne de 47 $ pour ce travail

yunussaha

Expert here. please check PM.

30 $ USD en 0 jours
(84 Commentaires)
6.6
garygoog

Hi .I am experienced about Facebook API .I can help you .

80 $ USD en 3 jours
(33 Commentaires)
5.7
divinedts

Please Read PM

30 $ USD en 1 jour
(3 Commentaires)
2.5