Post pic on wall with message with Android Facebook SDK 3.0

后端 未结 2 581
星月不相逢
星月不相逢 2021-02-04 21:22

How can i post message along with Picture using Facebook SDK 3.0 on Android,

The link -> can post small pic with link and all other information.

http://developer

相关标签:
2条回答
  • 2021-02-04 21:50

    You can use the Graph API to post photos to a user's wall.

    See the reference page for more details.

    In the Facebook SDK, you would use the Request class to make Graph API calls.

    You can use the newUploadPhotoRequest method to add a photo.

    If you want to add a description as well, try setting the "message" parameter:

    Request photoRequest = Request.newUploadPhotoRequest(...);
    Bundle params = photoRequest.getParameters();
    params.putString("message", "description  goes here");
    photoRequest.executeAsync();
    
    0 讨论(0)
  • 2021-02-04 21:59

    Facebook changed this implementation for there version 2 Graph API requests, they recommend a Custom Story instead of posting (if you have your own content to put on the wall of the facebook user beside his comment, or even without his comment)

    documentation goes here :

    https://developers.facebook.com/docs/android/open-graph?locale=en_GB

    just an error in the documentation, the facebook Open Graph objects are refered to by a colon, and not a dot, for example

    they mention an open graph Object named "book" in a work space named "books" that way

    "books.book"
    

    the correct way is

    "books:book"
    

    and after you finish implementation you will need to review your application to facebook, which it's documentation goes here as well

    https://developers.facebook.com/docs/apps/review?locale=en_GB

    i really hate facebook documentation, it sucks

    0 讨论(0)
提交回复
热议问题