Đã Đóng

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

Kỹ năng: PHP

Xem thêm: user visible thrown, oauthexception 210 user visible, 210 user visible thrown, facebook user visible thrown, friends data name, uncaught oauthexception 210, oauthexception 210, what graph, post graph, list graph, link graph, get fix, array graph, 210 user visible, facebook number friends, rtl code, summary table, small fix, profile id, php facebook, graph api, fix api, facebook posting, facebook graph, facebook graph api

Về Bên Thuê:
( 17 nhận xét ) Ramat Gan, Israel

Mã Dự Án: #1069194

3 freelancer đang chào giá trung bình $47 cho công việc này

yunussaha

Expert here. please check PM.

$30 USD trong 0 ngày
(84 Đánh Giá)
6.6
garygoog

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

$80 USD trong 3 ngày
(33 Đánh Giá)
5.7
divinedts

Please Read PM

$30 USD trong 1 ngày
(3 Đánh Giá)
2.5