Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I post text on a friend's wall using the android facebook sdk
    primarykey
    data
    text
    <p>I am trying to use the Android Facebook sdk to make a post on the user's friend's wall. I have successfully posted to the user's own news feed using similar calls. With my current code, the post to a friend works without a hitch, except that the message is blank. None of the attachments seem to work. It shows up as a completely blank post on the friend's wall.</p> <p>This is the code I am using:</p> <pre><code>private void publishChallengeToFriend() { String description = "I challenge you to " + m_challenge.getTitle() + "!" + " I finished this challenge with a score of " + getScore() + "." + " Can you beat that?"; Bundle params = new Bundle(); params.putString(Facebook.TOKEN, m_facebook.getAccessToken()); params.putString("message", ""); params.putString("name", "You have been challenged!"); params.putString("caption", "Mobile Challenges"); params.putString("description", description); try{ m_facebook.request(getFriendId() + "/feed",params, "POST"); } catch (Exception e){ Log.d("TAG", "Facebook Error: " + e.getLocalizedMessage()); } } </code></pre> <p>I have already authorized the user, and I know that works because I can post to the user's own feed. I am aware of the github issue #166 at <a href="https://github.com/facebook/facebook-android-sdk/issues/166" rel="nofollow">https://github.com/facebook/facebook-android-sdk/issues/166</a>. I have tried using putByteArray() for each of the attachments by calling getBytes() on each string I would like to transmit. This still shows up as a blank post on the friend's wall.</p> <p>I am open to using any method of posting on the friend's wall, it doesn't have to be a facebook request. I have also used asyncfacebookrunner.request() and have had the same problem. Ideally, I would like to use a dialog to show this, but I have no idea how to use the dialog() function for friend posts. I use that for status updates without a hitch, however.</p> <p>Thank you!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload