koala

Making OmniAuth, Devise and Koala work together

扶醉桌前 提交于 2019-12-02 18:37:51
I have an app in which I am implementing authentication using devise and omniauth. Ive got the logging in / out etc figured out, what i wanted to know was, what is the most efficient way to have a connection to the users graph api end point initialised and ready for use within my application. eg: If on the profile page i wanted to do, profile_image = current_user.fbgraph.get_picture("me") How would I accomplish this with the least number of API calls (i will be using similar calls throughout the application) You can accomplish this using something like Koala . When you authenticate the user,

Facebook Graph API - Large Image from Event?

耗尽温柔 提交于 2019-12-01 20:22:45
So I'm currently trying to retrieve event images from a FB page I created for an organization I'm a part of. When make a call to graph.facebook.com/{event-id}/picture I get an absurdly small 50x50 image. However, the documentation lists a few sizes for the 'type' arg ( https://developers.facebook.com/docs/graph-api/reference/event/picture/ ). When I specify a large type, I get a 200x200px image. There are the 'height' and 'width' fields, but if I specify anything larger than 200px, such as height: 400 and width: 350, I get a 200x200 pic returned. From previous SO threads it looks like this

Facebook iframe app being redirected out of canvas after user authorization

≡放荡痞女 提交于 2019-11-29 02:44:19
My facebook app is being redirected to the canvas url (http://my-domain/app) after the user has authorized the app. The sequence of steps is described below: 1) A new user opens the app in canvas and is redirected to oauth permissions dialog via Javascript redirection 2) Once the user has authorized the app, the redirect_uri of the app is called and I get the access token which I save in session 3) I also get the user id of the authorized user and save it to session 4) When I redirect it to the canvas url, it moves out of the facebook canvas 5) If I try to redirect it to the canvas page (http:

Facebook Graph publish posts with link and custom picture not working on v2.9

故事扮演 提交于 2019-11-28 14:01:56
I remember when I was using Graph v2.8, I could set custom picture and caption for link. Now it is impossible for v2.9. Is there some kind of workaround without specifying og: tags. How it was on v2.8: How it is now on v2.9: Unfortunately there is currently NO publicly known workaround. According to facebook developers blog: As part of our continuing efforts to stop the spread of misinformation and false news on our platform, earlier this year at F8 we announced an important change to our Graph API: Graph API version 2.9 includes a 90 day deprecation of the ability to edit previews attached to

Facebook token expiration and renewal, with Koala and omniauth-facebook

无人久伴 提交于 2019-11-28 03:42:59
I'm writing a Rails app that uses omniauth-facebook to authenticate the user against FB (and to get a FB OAuth access token for the user). The app then uses Koala to make various calls to the FB Graph API, using that saved OAuth token. I update the saved token each time the user re-authenticates (typically when they log in to my app). Even so, that saved token will expire (or otherwise become invalid) from time to time. What's the best practice around guarding against auth failures and updating the token while using Koala? Should all calls be wrapped in begin/rescue blocks, with an exception

Facebook iframe app being redirected out of canvas after user authorization

亡梦爱人 提交于 2019-11-27 17:01:45
问题 My facebook app is being redirected to the canvas url (http://my-domain/app) after the user has authorized the app. The sequence of steps is described below: 1) A new user opens the app in canvas and is redirected to oauth permissions dialog via Javascript redirection 2) Once the user has authorized the app, the redirect_uri of the app is called and I get the access token which I save in session 3) I also get the user id of the authorized user and save it to session 4) When I redirect it to

Facebook Graph publish posts with link and custom picture not working on v2.9

痞子三分冷 提交于 2019-11-27 08:05:53
问题 I remember when I was using Graph v2.8, I could set custom picture and caption for link. Now it is impossible for v2.9. Is there some kind of workaround without specifying og: tags. How it was on v2.8: How it is now on v2.9: 回答1: Unfortunately there is currently NO publicly known workaround. According to facebook developers blog: As part of our continuing efforts to stop the spread of misinformation and false news on our platform, earlier this year at F8 we announced an important change to