2011-04-22 4 views
0
I like to post data from application to many users who have granted the application. 
I tried in following steps. 

step:1 first get access_token as an application by following. 
https://graph.facebook.com/oauth/access_token?  
client_id=XXXXXX&client_secret=YYYYYYYYYYYY&grant_type=client_credentials 

step2: 
    $facebook = new Facebook("KEY","SECRETKEY"); 
    $param = array(
     'method' => 'stream.publish', 
     'message' => 'aaaaaaaaaaaaaaa', 
     'target_id' => 'ZZZZZZZZZZZZZZ', 
     'attachment' => $attachment, 
     'access_token' => GENERETED ACCESS TOKEN FROM STEP1 , 
     'callback' => '' 
    ); 

    $fqlResult2 = $facebook->api("/IIIIIIIIIIIIIIIII/feed/" , "post", $param); 

but the application cant post to the targeted users wall how can i achieve? 
The error was "User not visible". 

but works for the code given below:[retrieve user info] 
$fql = "select name, hometown_location, sex, pic_square, email from user where  
      uid=1000000001"; 
$param = array(
    'method'  => 'fql.query', 
    'query'  => $fql, 
    'access_token' =>GENERETED ACCESS TOKEN FROM STEP1 , 
    'callback' => '' 
); 

$fqlResult2 = $facebook->api($param); 

so how can application can post the specified users wall/newsfeed?the above code was wrong? 
+0

아무런 문제가 없지만 응용 프로그램을 부여한 사용자 벽에 응용 프로그램을 게시 할 수 있지만 응용 프로그램을 사용자 벽에 게시하면 수신자의 이름과 사진이 표시되지만 원하는대로 나타납니다. 다른 fanpage 로고 및 사용자 정의 제목 표시 – msaif

+0

로고 및 제목을 어떻게 대체 할 수 있습니까? – msaif

답변

0

"사용자가 보이지 않습니다"라는 오류는 사용자의 개인 정보 보호 설정으로 인해 사용자가 벽에 게시 할 수 없음을 의미합니다.

또한 기존의 REST API를 사용하고 있으며 더 이상 사용되지 않습니다. Graph API

+0

사용자의 개인 정보 설정은 허용하지만 (# 210) 사용자에게 표시되지 않는 오류 – msaif

관련 문제