restfb

RestFB: Using a facebook app to get the users Access Token

旧街凉风 提交于 2019-11-29 08:06:49
问题 This is what i have: static AccessToken accessToken = new DefaultFacebookClient().obtainExtendedAccessToken("<my app id>", "<my app secret>"); static FacebookClient client = new DefaultFacebookClient(); public static void main(String args[]) { System.out.print("Enter Your Status: "); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String status= null; try { userName = br.readLine(); System.out.println(".........."); } catch (IOException ioe) { System.out.println("!")

Facebook: send an app invitation

假如想象 提交于 2019-11-27 03:27:13
问题 How can I send an invitation to use an app with Graph API? I looked at the reference, and can't find something that fits. Any clue? 回答1: If you need to use restfb, as I got from your tags, you can try this: This is a self contained junit test that retrieves the authentication token and posts an apprequest. No user generated auth_token is required but you can only send apprequests like this to users that already have authorized your app. Dependencies are JUnit, Commons HttpClient and restfb

What are the Steps to getting a Long Lasting Token For Posting To a Facebook Fan Page from a Server

对着背影说爱祢 提交于 2019-11-26 01:43:38
问题 I have a Business Page in Facebook (known as a Fan Page in Facebook vernacular). I want to post to that Page whenever a user takes a certain action on my app. I want to post as the Page itself rather than a user (i.e. from my personal account). The post will come from my outside server (I am using restFB). I have gone through the steps of authorizing my personal account with appropriate manage_pages permissions for the Page. I have also gotten an access token for the page. I have even been