Babajide Prince
Babajide Prince

Reputation: 562

Post to Facebook page as Admin

I didn't know Java + Facebook integration would cost an arm and a leg. Does anyone have a sample code to post to Facebook page as admin?

I understand the OAuth process, I just need to send an OAuthRequest with my text using scribe lib . And if possible, How to send a byte[] (a picture).

request.addBodyParameter("status", "Testing: Updating my facebook status through Java"); service.signRequest(accessToken, request);
Response response = request.send();

I have tried the above code from scribe example but I get {"error":{"message":"(#100) Can only call this method on valid test users for your app","type":"OAuthException","code":100}}

Thanks.

Upvotes: 0

Views: 587

Answers (1)

user489504
user489504

Reputation:

I believe you need to generate an application token (assuming you have all the proper permissions) using the app secret and using this newly created token in your posts, etc.

Upvotes: 1

Related Questions