2012-05-02 2 views
0

Привет я использую ниже код, чтобы оставлять стены моей Facebook, это добавляет к стене к моему Facebook, ноFacebook стена не видна всем

не видно моих друзей. , как я могу это сделать

public void postOnWall(String songtitle,String artist,String location,String desc) { 
    String msg=desc+" at "+location+" listening to "+songtitle+" by "+artist; 
    String description="Share your memories with the all new social map!"; 
    try { 
      String response; 
      Bundle parameters = new Bundle(); 
      parameters.putString("message",msg); 
      parameters.putString("description",description); 
      parameters.putString("link",""); 
      parameters.putString("name",""); 
      response = mFacebook.request("me/feed", parameters,"POST"); 

      Log.d("Tests", "got response: " + response); 
      if (response == null || response.equals("") || 
        response.equals("false")) { 
       Log.v("Error", "Blank response"); 
      } 
    } catch(Exception e) { 
     e.printStackTrace(); 
    } 
} 

ответ

1

Попробуйте Snippet сделать ваше сообщение видимо для всего пользователя:

 try{ 
     String msg=desc+" at "+location+" listening to "+songtitle+" by "+artist; 
     String description="Share your memories with the all new social map!"; 
     Bundle parameters = new Bundle(); 
     JSONObject attachment = new JSONObject(); 

     try { 
      attachment.put("name", ""); 
      attachment.put("href", link); 
      attachment.put("message",msg); 
      attachment.put("description",description); 
     } catch (JSONException e) { } 
     parameters.putString("attachment", attachment.toString()); 
     parameters.putString("method", "stream.publish"); 
     parameters.putString("target_id", "Your Used ID"); // Optional 
     String response = mFacebook.request(parameters);  
     } 
    catch(Exception e){} 
0

вы должны добавить строку под названием privacy к вашим параметрам, как это:

 parameters.putString("privacy","friends"); 

для получения дополнительной информации, попробуйте прочитать Facebook Post reference page

+0

i add ed выше параметр также. Если я добавлю эту стену, не отправляйте на facebok – koti

Смежные вопросы