I’ve tried to find the answer with searching similar problem, but I couldn’t get it.
Currently I developing an Android app game which can post the score to facebook directly after login. My problem is, the posting result only show the message, it didn’t show the description, name, caption, and the picture. Here is the code.
public void onComplete(Bundle values)
{
try
{
byte[] data = null;
Bitmap bi = BitmapFactory.decodeResource(getResources(),R.drawable.rocket);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bi.compress(Bitmap.CompressFormat.PNG, 100, baos);
data = baos.toByteArray();
Bundle params = new Bundle();
params.putString("message", Var.getPostContent() + " Achieved");
params.putString("name", "This will appear beside the picture");
params.putString("caption", "This will appear under the title");
params.putString("description", " lal ala !!!");
params.putByteArray("picture", data);
mFacebook.request("me/feed", params, "POST");
}
catch (Exception e) {}
}
and this is the permission
private String[] PERMS = new String[] { "user_events","publish_stream" };
really appreciate any help ☺
The picture param should be a String, representing a complete URL.
You’re using the correct params for caption,name and description. They should show up on the wall.
Can you remove the picture param, and replace it with a String, representing a full URL.