Announcement Announcement Module
Collapse
No announcement yet.
How to Send message with a Link and Callback to my Controller for the Facebook App Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Send message with a Link and Callback to my Controller for the Facebook App

    Hi All,

    How to Send message with a Link and Callback to my Controller for the Facebook Application using Spring Social

    MultiValueMap<String, Object> map = new LinkedMultiValueMap<String, Object>();
    map.set("link", "Hi Hello");
    map.set("name", "Link Heading");
    map.set("caption", "Link Caption");
    map.set("description", "description here");
    map.set("message", "hello world");

    // THE BELOW LINES ARE THE CRITICAL PART I WAS LOOKING AT!
    map.set("picture", "http://localhost:8080/xxxapp/images/hsbc.png"); // the image on the left
    String linkUrl = "http://localhost:8080/xxxapp/service/facebookservice/fbimagecallback?userId="+facebookProfile.getId();
    map.set("actions", "{'name':'myAction', 'link':'http://localhost:8080/xxxapp/service/facebookservice/fbimagecallback'}"); // custom actions as JSON string

    facebook.publish(facebookProfile.getId(), "feed", map);


    When i do the Above i am getting the below Problem
    org.springframework.social.UncategorizedApiExcepti on: (#100) link URL is not properly formatted

    Can any one help me out to resolve the Above issue

    I am able to update the status using the
    facebook.feedOperations().updateStatus("I'm trying out Spring Social!");

    when i send a Normal message i am able to Post the Message in My Facebook Wall.

    My Problem:
    1) To Send a Facebook Message with a Link embedded in the Message to the all my Facebook Friends Or can be Selected Friend's List using the Spring Social
    2) when a friend click on the link i need to get the Control to http://localhost:8080/xxxapp/service...bimagecallback


    Regards
    Srikanth

  • #2
    I'm not sure without further digging, but the 2nd line sets "link" to "Hi Hello"...which isn't a properly formatted URL. Could it be that one that's breaking it?

    Comment

    Working...
    X