I am using koala gem in rails 3. I used the following answer to get the permanent access token for my page. And I have given all permissions to this access token for my testing purposes.
public_profile, basic_info, read_stream, read_mailbox, read_page_mailboxes, rsvp_event,
email, read_insights, manage_notifications, manage_pages, publish_actions, user_birthday,
user_religion_politics, user_relationships, user_hometown, user_location, user_likes,
user_activities, user_interests, user_education_history, user_work_history, user_website,
user_groups, user_events, user_photos, user_videos, user_friends, user_about_me,
user_status, user_games_activity, user_tagged_places, user_actions.books,
user_actions.music, user_actions.video, user_actions.news
Now from the rails console I do the following:
access_token = "some_string"
@user = Koala::Facebook::API.new(access_token)
@attachment = {:name => "Link name", :link => "http://www.example.com/", :caption => "{*actor*} posted a new review", :description => "This is a longer description of the attachment"}
@user.put_wall_post("This is some text", @attachment)
The action returns the following:
Koala::Facebook::ClientError: type: GraphMethodException, code: 100, message: Unsupported post request. [HTTP 400]
But my page wall does show the post. I am wondering what may be the issue?
As it turned out my application was not published so all calls were returning an error. Changing the application status resulted in fixing the issue.