2011-12-12 143 views
-1

我正在開發一個應用程序,它能夠讓用戶發送消息給Facebook上的朋友。我曾看過Facebook API,Hackbook文件夾。我使用了下面的代碼,但它不起作用。它似乎要求我爲它實施一個新的對話框。發送消息給在facebook上的朋友Android

Bundle params = new Bundle(); 
params.putString("caption", app_name); 
params.putString("picture", picture); 

dialog(MyClass.this, "send", params, new UpdateStatusListener()); 

任何幫助非常感謝!

+0

在哪裏,你正在使用來自對話框()方法? – ethan

回答

0

檢查這個片段張貼在朋友的牆上:

try{ 
    parameters.putString("message", "Text is lame. Listen up:"); 
    parameters.putString("target_id", "XXXXX"); // target Id in which you need to Post 
    parameters.putString("method", "stream.publish"); 
    String response = authenticatedFacebook.request(parameters);  
    Log.v("response", response); 
} 
catch(Exception e){} 
相關問題