restfb

how do i share a post on facebook using restfb

霸气de小男生 提交于 2020-02-27 03:15:55
问题 this is my java code using resfb lib to post something on my facebook groups feed: FacebookClient fb=new DefaultFacebookClient(token); FacebookType message=fb.publish(pid+"/feed",FacebookType.class,Parameter.with("message", description)); now what do i do to share posted article? thanks a lot for your help! 回答1: Graph API doesn't provide an explicit share operation, but you can create a post which is a link to another post, which should be displayed as a share. Something like this: fb.publish

Posting app generated apprequest to other facebook users in Java

南楼画角 提交于 2020-01-14 03:16:10
问题 Ok, what I want to do seems like an extremely core part of the facebook apps experience, and yet I can't find any decent examples. I just want to generate an 'apprequest' to notify another user when something of interest has happened when a friend used the app. I'm using Java and RestFB, and have tried this code: FacebookType publishMessageResponse = fbClient.publish("me/apprequests", FacebookType.class, Parameter.with("message", "RestFB test")); and have tried replacing "me" with a user id,

How to fetch more than 25 post messages

谁都会走 提交于 2020-01-12 07:16:20
问题 I'm trying to get all post messages using restfb, my code is as follows public Connection<Post> publicSearchMessages(Date fromDate, Date toDate) { Connection<Post> messages = publicFbClient.fetchConnection("search", Post.class, Parameter.with("q", "Watermelon"), Parameter.with("since", fromDate), Parameter.with("until", toDate), Parameter.with("type", "post")); return messages; } This only gives latest 25 post messages. Parameter.with("limit",100 ) If i set limit parameter, it gives 100

How to fetch more than 25 post messages

蹲街弑〆低调 提交于 2020-01-12 07:15:09
问题 I'm trying to get all post messages using restfb, my code is as follows public Connection<Post> publicSearchMessages(Date fromDate, Date toDate) { Connection<Post> messages = publicFbClient.fetchConnection("search", Post.class, Parameter.with("q", "Watermelon"), Parameter.with("since", fromDate), Parameter.with("until", toDate), Parameter.with("type", "post")); return messages; } This only gives latest 25 post messages. Parameter.with("limit",100 ) If i set limit parameter, it gives 100

Post on Facebook Page with Application Access Token

自古美人都是妖i 提交于 2020-01-05 03:11:26
问题 I have a facebook page, a facebook app and an administrator facebook account of that page. Now i want to publish a link on that page (i don't care how). Since now i did that by getting a user access token of the admin for my app, then get the page, get a access token for that and then post with the admin on the page via my app. Now the token expired and i read in the documentation that i can: For example, if a user granted your app publish_stream permissions, your app can use an app access

How to set Facebook album privacy with Graph API?

血红的双手。 提交于 2020-01-03 15:59:12
问题 I would like to know if it's possible to set the privacy setting for a specific Facebook album with RestFB Java library ? Thank you very much, Regards, Anthony 回答1: You can set privacy settings when the album is created. Currently, you can not update the settings, nor can you delete an existing album via API, in case you wanted to just delete and recreate it as a work around. http://bugs.developers.facebook.net/show_bug.cgi?id=17111 When you create the album, you need to create a privacy

Posts that have tagged my Page don't show up with API call

前提是你 提交于 2020-01-03 08:48:51
问题 I have a Facebook Page created for my service here. The name of the page is Rowz. There are some posts on the page by users who have tagged the Page in posts on their own walls. Those posts show up on the Rowz Page timeline. In the Graph API for Page there is a field 'tagged' which I assumed would get me these posts but the same doesn't work. Is there a way to fetch those posts that have tagged Rowz in them? 回答1: According to the documentation for page object in graph API, tagged connection

Facebook emails always return null through FQL and RestFB

不羁的心 提交于 2020-01-02 03:34:07
问题 I'm trying to convert friend pages into fan pages (most businesses have created friend pages by mistake) and am trying to email everyone on a friend list about the move. I've tried FQL "SELECT email FROM user WHERE uid=xxxx" Creating groups (not good for 5000 friend pages) Restfb: Connection myFriends = facebookClient.fetchConnection("me/friends", User.class) etc; The FQL and RestFB methods are both returning nada, group email method is just plain messy. Is this a security feature or can this

restfb: Writing a facebook application with java (using the new graph api)

泄露秘密 提交于 2019-12-30 03:35:10
问题 I'm trying to write a facebook application using Java tomcat with RestFB. the restfb documentation shows the following: Create a Facebook Application Request https://graph.facebook.com/oauth/authorize?client_id=MY_API_KEY& redirect_uri=http://www.facebook.com/connect/login_success.html& scope=publish_stream,offline_access,create_event Facebook will redirect you to http://www.facebook.com/connect/login_success.html? code=MY_VERIFICATION_CODE Request https://graph.facebook.com/oauth/access

How do i use RestFB IgUser getBusinessDiscovery()?

ⅰ亾dé卋堺 提交于 2019-12-25 03:29:11
问题 In the FB Graph API explorer the call to get business_discovery data uses the Instagram id for any user (in this case my own account) and uses a "username" to indicate the 3rd-party account from which one would like to get some public information. Say for example, we want to get public data like name,followers_count,media_count for the instagram page motorolaus - the Graph Explorer the call would be something like: GET /v3.2/?fields=name,username,business_discovery.username( motorolaus ){name