koala-gem

How to mention a Facebook Page as a test user with the Graph API

走远了吗. 提交于 2019-12-23 01:29:10
问题 I understand that in order for me to mention a Facebook page before submitting it for approval I must be posting as a page I admin, tagging a page I admin and using an app I admin - otherwise, the tags are not applied. The problem with this is that test users are not app admins. I know I can use my personal account since I'm an admin of the app, but I want to avoid creating actual Facebook accounts/Pages to test this functionality. I would like to know how/if it is possible to test page

Gem Koala Facebook API get_object request

天大地大妈咪最大 提交于 2019-12-22 17:11:18
问题 I'm trying to get user's info via Gem Koala Facebook API with below code @graph = Koala::Facebook::API.new(auth_hash.credentials.token) profile = @graph.get_object("me") user.update( url: auth_hash.extra.raw_info.id, email: auth_hash.extra.raw_info.email, friends: @graph.get_connections("me", "friends"), birthday: @graph.get_object("me", "birthday") ) friends: @graph.get_connections("me", "friends") works perfectly fine, I will get a list of friends. However birthday: @graph.get_object("me",

How to get localized values from Facebook Open Graph API through Koala?

一世执手 提交于 2019-12-22 06:22:11
问题 I am using the koala gem in my rails app to use the Facebook Open Graph API. The primary language of the app is German. Is there a way to set a locale to get e.g. the user's current city in German? Or is there another reliable wa to translate locations? 回答1: The Graph API supports the passing of the locale parameter. For Germany, this would be de_DE . You can test this via GET /me?fields=location&locale=de_DE compared to GET /me?fields=location&locale=en_GB Have a look at https://developers

Rails koala “error unsupported get request” after long task - calling FB graph API

本秂侑毒 提交于 2019-12-14 02:37:59
问题 After a long task (14s and can be more with more than 600 call to Facebook) my app returns a 500 internal server error with the following description: Koala::Facebook::APIError (GraphMethodException: Unsupported get request.) What I do is something like this: @FBGraph = Koala::Facebook::API.new tud = MyUsers.all tud.each do |user| graph = @FBGraph.get_object(user.fb_user_id) picture = @FBGraph.get_picture(user.fb_user_id) thisTud = MyUsers.find(user.id) thisTud.name = graph["name"] thisTud

How to deauthorize User Facebook Permissions using Koala gem

為{幸葍}努か 提交于 2019-12-12 19:23:20
问题 I am using Koala to handle FB calls. Everything is working fine except I can't figure out how to deauthorize a user's FB permissions. The equivalente REST call would be to: DELETE /{user-id}/permissions/{permission-name} The Koala wiki indicates all REST calls are supported via: @rest = Koala::Facebook::API.new(oauth_access_token) @rest.fql_query(my_fql_query) # convenience method @rest.fql_multiquery(fql_query_hash) # convenience method @rest.rest_call("stream.publish", arguments_hash) #

How to mention a Facebook Page as a test user with the Graph API

耗尽温柔 提交于 2019-12-07 13:29:19
I understand that in order for me to mention a Facebook page before submitting it for approval I must be posting as a page I admin, tagging a page I admin and using an app I admin - otherwise, the tags are not applied. The problem with this is that test users are not app admins. I know I can use my personal account since I'm an admin of the app, but I want to avoid creating actual Facebook accounts/Pages to test this functionality. I would like to know how/if it is possible to test page mentions using a test users account. This question is what made me realize that I was going about it in the

Gem Koala Facebook API get_object request

[亡魂溺海] 提交于 2019-12-06 07:57:25
I'm trying to get user's info via Gem Koala Facebook API with below code @graph = Koala::Facebook::API.new(auth_hash.credentials.token) profile = @graph.get_object("me") user.update( url: auth_hash.extra.raw_info.id, email: auth_hash.extra.raw_info.email, friends: @graph.get_connections("me", "friends"), birthday: @graph.get_object("me", "birthday") ) friends: @graph.get_connections("me", "friends") works perfectly fine, I will get a list of friends. However birthday: @graph.get_object("me", "birthday") will give me type: OAuthException, code: 2500, message: Unknown path components: /birthday

How to get localized values from Facebook Open Graph API through Koala?

廉价感情. 提交于 2019-12-05 11:32:14
I am using the koala gem in my rails app to use the Facebook Open Graph API. The primary language of the app is German. Is there a way to set a locale to get e.g. the user's current city in German? Or is there another reliable wa to translate locations? The Graph API supports the passing of the locale parameter. For Germany, this would be de_DE . You can test this via GET /me?fields=location&locale=de_DE compared to GET /me?fields=location&locale=en_GB Have a look at https://developers.facebook.com/docs/internationalization https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0