mhd
mhd

Reputation: 4707

How to update address of a facebook page through API

I am trying to update address/location of a facebook business page through API using koala ruby gem, so far no working solution.

page_access_token = "gw4t3434"
page_api = Koala::Facebook::API.new(page_access_token)
page_api.graph_call('me', {:location => {:street => "my street"}}, 'post') #error. Koala::Facebook::APIError: OAuthException: (#100) Parameters do not match any fields that can be updated
page_api.graph_call('me', {:location => {:address => "my street"}}, 'post') #error. Koala::Facebook::APIError: OAuthException: (#100) Parameters do not match any fields that can be updated
page_api.graph_call('me', {:address => "my street"}}, 'post')# not raise error but not working
page_api.graph_call('me', {:street => "my street"}}, 'post')# not raise error but not working

I can not find clear explanation either in facebook api reference regarding updating address in a page. I may missing something...

Upvotes: 0

Views: 509

Answers (1)

Gunnar Karlsson
Gunnar Karlsson

Reputation: 28480

You can't write to the location object, only read. See "Updating Page Attributes" in the API. Also, there is no permission to request for writing to a location object.

An alternative is that you write to the Page's about section - this is allowed. Perhaps you can place an address reference here to meet the requirement of making address changes visible to the end user.

Upvotes: 2

Related Questions