|
|
|
[Android] การแชร์ลิงค์ทางเฟสบุค แชร์ไม่ได้เพราะมีตัว & เชื่อมอยู่ใน URL |
|
|
|
|
|
|
|
น่าจะใช้แบบนี้น่ะครับ
Code (Android-Java)
public void postOnWall() {
try{
Bundle parameters = new Bundle();
parameters.putString("message", "Text is lame. Listen up:");
parameters.putString("name", "Name");
parameters.putString("link", "http://www.google.com");
parameters.putString("caption", "Caption");
parameters.putString("description", "Description");
String response = facebook.request("me/feed",parameters,"POST");
Log.v("response", response);
}
catch(Exception e){}
}
Code (Android-Java)
try{
Bundle parameters = new Bundle();
JSONObject attachment = new JSONObject();
try {
attachment.put("message", "Messages");
attachment.put("name", "Get utellit to send messages like this!");
attachment.put("href", link);
} catch (JSONException e) {
}
parameters.putString("attachment", attachment.toString());
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){}
Code
http://stackoverflow.com/questions/5280720/facebook-post-on-friends-wall-in-android/7744153#7744153
http://stackoverflow.com/questions/7712281/facebook-post-to-wall-on-android-message-only/7712424#7712424
http://stackoverflow.com/questions/7649620/facebook-post-to-wall-give-exception/7649781#7649781
|
|
|
|
|
Date :
2012-12-23 05:59:49 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|