Results 1 to 3 of 3

Thread: Spring Social Facebook template publish image

  1. #1
    Join Date
    Jan 2010
    Posts
    18

    Default 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. #2
    Join Date
    Jan 2010
    Posts
    18

    Default

    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)

  3. #3
    Join Date
    Aug 2004
    Posts
    1,099

    Default

    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.
    Craig Walls
    Spring Social Project Lead

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •