koala

Graph API won't return friends' religions

陌路散爱 提交于 2019-12-13 06:00:08
问题 I have a screen where users can select Facebook friends. After submitting the form, I'm requesting a profile object from Facebook with specific fields (e.g.: https://graph.facebook.com/some_id?fields=id,name,religion&access_token=xxx ). When I request my own profile data with the religion field in the request, I'm seeing the value properly included with the result. When I request my friends' profile data, the response is not including their religion even though I can see it when viewing their

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) #

Rails koala get page and page post insights

◇◆丶佛笑我妖孽 提交于 2019-12-12 01:46:02
问题 Getting insights for page posts returning [] This is for the adidas page pp graph.get_object("182162001806727/insights/") It generally returns fields for country data and nothing for page_impressions or page_engagement , etc Even though the docs mention that Insights are generated for a psot/page with more than 30 likes, but still nothing. Infact, insights for the first post of Adidas page returns absolutely nothing pp graph.get_object("182162001806727_1189840444372206/insights") or graph.get

Gathering a user's news feed with Koala (Ruby)

China☆狼群 提交于 2019-12-10 21:41:17
问题 I want to pull in a user's newsfeed after they have authenticated. I am using the Koala gem but if I call get_connection('me', 'feed') it only returns the last three posts on my wall. I want the last ~100 posts (or since post 1234567) that would show up on the user's home page. 回答1: You can get all posts during a certain time period using FQL. Here is an example that should get you started: @feed = Koala::Facebook::API.new(current_user.token) to = Time.now.to_i yest = 1.day.ago.to_i @feed.fql

Deprecated offline_access on facebook with RoR

我的梦境 提交于 2019-12-09 06:25:12
问题 We have a problem in our RoR app. We are using a facebook authentication with omniauth, and searching the user friends with Koala. But lately, when we try to show a friend photo, we got this error: Koala::Facebook::APIError in Homes#show Showing /home/daniel/Homes/app/views/shared/_event.html.erb where line #19 raised: OAuthException: Error validating access token: Session has expired at unix time 1328727600. The current unix time is 1328802133. Extracted source (around line #19): 16: <img

put_connections() to Facebook graph in Koala fails after a very long delay

早过忘川 提交于 2019-12-09 06:22:30
问题 I am using Rails 3.2.5 and Koala 1.3.0 (not the latest, because the latest refuses to run even the sample Facebook app from Heroku). Web server is Unicorn. When I try to POST to timeline using put_connections(): @fbgraph = Koala::Facebook::API.new(session[:access_token]) logger.debug "put_connections(#{url_for @room}), start" @fbgraph.put_connections("me", "myapp:view", :room => url_for(@room)) logger.debug "put_connections(), end" The controller stalls for 12s before getting an exception:

Deprecated offline_access on facebook with RoR

强颜欢笑 提交于 2019-12-03 08:01:01
We have a problem in our RoR app. We are using a facebook authentication with omniauth, and searching the user friends with Koala. But lately, when we try to show a friend photo, we got this error: Koala::Facebook::APIError in Homes#show Showing /home/daniel/Homes/app/views/shared/_event.html.erb where line #19 raised: OAuthException: Error validating access token: Session has expired at unix time 1328727600. The current unix time is 1328802133. Extracted source (around line #19): 16: <img src="../assets/friends-icon.png" alt="User profile apicture" height="33" width="43"> 17: <% if current

Making OmniAuth, Devise and Koala work together

感情迁移 提交于 2019-12-03 05:20:19
问题 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

koala使用指南

一笑奈何 提交于 2019-12-03 03:43:40
选择koala的7大优势: 多语言支持:支持Less、Sass、CoffeeScript 和 Compass Framework。 实时编译:监听文件,当文件改变时自动执行编译,这一切都在后台运行,无需人工操作。 编译选项:既可统一设置文件的编译选项,也可单独设置某个文件的编译选项。 强大的文件右键功能:右键文件元素,即可操作打开文件,打开文件目录,打开输出文件目录,设置输出文件目录,编译,删除六大常用功能。 错误提示:在编译时如果遇到语法的错误,koala将在右下角弹出错误信息,方便开发者定位代码错误位置。 跨平台:windows、linux、mac都能完美运行。 免费且负责:koala完全免费,而且作者很负责,有什么问题作者都会及时给予答复,意见什么的可以直接提交给作者,一般在下一个版本就能得到解决。 了解了它的优点之后,我们来熟悉下它的界面,这个其实也是我选择它的一个原因。 简洁面板 上面四个数字分别对应四个区域: 第一区域:第一个按钮用于添加项目,第二个按钮打开编译文件的错误提示,第三个按钮设置koala,里面可以设置所有文件默认的编译输出方式,需要过滤的文件,界面语言(中文/英文)等。当然这里也包括目前koala的版本号及作者等信息。 第二区域:project区域,可以直接把项目拖进该区域 第三区域:需编译的文件列表,默认以下划线开头的文件不出现列表中

less的四种使用方法介绍

匿名 (未验证) 提交于 2019-12-03 00:21:02
1、直接引入less.js 使用步骤: 1、到less官网,下载less文件 2、在编译器中新建一个less文件,引入到我们的html页面中(注意下面的和css的引入方式稍微有些不同哦,看rel) <link href="css/style.less" rel="stylesheet/less"/> 3、引入我们下载的less文件 <script src="js/less.min.js"></script> 然后就可以使用了 好处:能获取到客户端的数据,从而进一步计算 坏处:在客户端解析less,造成性能浪费,不利于维护(不推荐) 2、koala编译器 使用步骤: 1、在koala-app.com中下载软件就可以 2、打开koala软件,然后将我们的less所在的文件夹拖拽到软件中 3、koala会自动读到less文件,然后点击less文件,单击右键,选择输出的路径以及编译后的css文件名,之后在右侧菜单栏点击执行编译即可(上面的选项,只要把自动编译勾选即可,输出方式可以选择normal也可以选择compress(压缩)的方式,搜可以,其他的不需要管) 4、编译成功,会在我们指定的文件夹中生成一个css文件,之后将这个css文件引入我们的html文件中即可 (推荐小白使用) 使用步骤: 1、需要下载安装node环境,检测安装成功的方法在命令行输入npm,如果安装成功就会有一些信息