English 中文(简体)
删除使用图表gem的面板馈电站
原标题:delete a facebook feed post using fb_graph gem

我正在使用fb_graph rails gem,向我的用户Facebook提供信息。

我请求以下许可:

:scope =>  email, publish_actions, offline_access, publish_stream 

我能够向用户提供食物。 但我无法摧毁它。

当我在铁路公司执行以下规定时,你可以看到错误:

me = FbGraph::User.me( user.access_token )
@facebookpost = me.feed!( :message => "sample feed message", :description =>  sample message )
post = me.feed.find(@facebookpost.identifier).first

post.destroy # this generates the following error

FbGraph::InvalidRequest: OAuthException :: (#100) Invalid parameter
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/exception.rb:47:in `block in handle_httpclient_error 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/exception.rb:44:in `each 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/exception.rb:44:in `handle_httpclient_error 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/node.rb:146:in `handle_response 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/node.rb:63:in `delete 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/node.rb:43:in `destroy 
from (irb):67
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/commands/console.rb:45:in `start 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/commands/console.rb:8:in `start 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/commands.rb:40:in `<top (required)> 
from script/rails:6:in `require 
from script/rails:6:in `<main> 

  1.9.2-p318 :068 > post.destroy(user.access_token)
TypeError: can t convert Symbol into String
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/node.rb:93:in `delete 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/node.rb:93:in `build_endpoint 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/node.rb:61:in `delete 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/fb_graph-2.4.12/lib/fb_graph/node.rb:43:in `destroy 
from (irb):68
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/commands/console.rb:45:in `start 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/commands/console.rb:8:in `start 
from /home/invinc/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.1.3/lib/rails/commands.rb:40:in `<top (required)> 
from script/rails:6:in `require 
from script/rails:6:in `<main> 

我是否错过任何许可? 我能做些什么来解决这个问题?

最佳回答

你可以删除员额

FbGraph::Post.new(fb_post_id).destroy(access_token: "access_token")

不是最佳预报工具......

问题回答

v2.4要求你将笔款——离职金与客户补贴合并。

FbGraph2::Post.new(”#{client_id}_#{fb_post_id}”,access_token: “access_token”,destroy





相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...

热门标签