Announcement Announcement Module
Collapse
No announcement yet.
Spring Social Facebook template publish image Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Social Facebook template publish image

    Hi,
    am currently using spring social and have been able to publish text based messages on a facebook wall but wanted to know whether it was possible to do the same thing with an image , that is whether it was possible to post an image as a status update ?

    kind regards,
    javed

  • #2
    Found the following in the API , will give it a try:

    Connection<Facebook> connection = connectionRepository
    .findPrimaryConnection(Facebook.class);
    Facebook facebook = connection != null ? connection.getApi()
    : new FacebookTemplate();

    facebook.mediaOperations().postPhoto(photo)

    Comment


    • #3
      Yes, that will post a photo to an album (created especially for the app posting it, I believe), which will likely be reflected in the user's timeline. However, there's also the notion of being able to "attach" an image to a status update, which is not yet directly supported. This is the subject of https://jira.springsource.org/browse/SOCIALFB-30, https://jira.springsource.org/browse/SOCIALFB-31, and https://jira.springsource.org/browse/SOCIALFB-54 (note that I'll probably do some consolidation of those issues soon, as they are essentially describing the same thing).

      In the meantime, if that's the kind of image post you want and if you're familiar with how to construct the request to post requests to the Facebook API, then you can always do Facebook.getRestOperations() and then use it to do the job at a lower-level.

      Comment

      Working...
      X