开发者

Publishing URL through java application

开发者 https://www.devze.com 2023-04-11 04:11 出处:网络
When posting a URL on the facebook wall, facebook get URL data and mounts a post with that information. I wonder how do I post to this format by sending an URL using Java, for example using the API re

When posting a URL on the facebook wall, facebook get URL data and mounts a post with that information. I wonder how do I post to this format by sending an URL using Java, for example using the API restfb (http://restfb.com/) or using graph API or any other way to do this in Java.开发者_JAVA技巧

Thanks.


Solution:

var wallPost = {
            message : "Message in post",
            picture: URL_IMAGE,
            link: URL,
            name : POST_NAME,
            description: POST_DESCRIPTION
        };
        FB.api('/me/feed', 'post', wallPost , function(response) {
          if (!response || response.error) {
                 console.log("Error to post");
          }
        });
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号