ruby on rails - Multipule posts in loop with FbGraph gives: OAuthException :: (#1) An error occured while creating the share -


I am having trouble posting posts on the page, and only get useful error:

The first 20 or so posts did great work, then started this error.
Is there a limit on the number of Facebook pages can one page (spam) or something else?

I can reproduce the rail c form and I have tested my access_token triple and can post directly to FB manually. Br> (I am using page access_token my user one)

I opened an issue on the FBIfrape flue, but neo feels that Its an FB score

My code:

  admin = admin.first page = FbGraph :: Page.new (admin.facebook_page_id) Story .where (: Facebook_post_id = & gt; zero) .all.each do | Story | Post = page.feed! (: Link = & gt; 'http://www.example.com/stories/'+story.cached_slug ,: access_token = & gt; admin.facebook_page_access_token) story.facebook_post_id = post.identifier story.live = true story. Sleep sleep 1 end   

backrace:

  FbGraph :: InvalidRequest: OAuthException :: (# 1) / usr An error occurred while creating a share from 'block in handle_httpclient_error' in /local/rvm/gems/ruby-1.9.3-p392/gems/fb_graph-2.6.4/lib/fb_graph/exception.rb:47:in/usr /local/rvm/gems/ruby-1.9.3-p392/gems/fb_graph-2.6.4/lib/fb_graph/exception.rb:44:in- / usr / local / rvm / gem / ruby-1.9 in each. 3-p3392 / gemstone / FB_Graph-2.6.4 / lib / fb_graph / exception.rb: 44: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/fb_graph in `handle_httpclient_error ' -2.6.4 / lib / fb_graph / node.rb: 142: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/fb_graph-2.6.4/lib/fb_graph/node In `handle_response ' .rb: 55: 'Posted in' / usr / local / rvm / Formula / Feed from gems / ruby-1.9.3-p392 / gems / fb_graph-2.6.4 / lib / fb_graph / connec RB: 14: `In the feed! From 'IRB_binding in Block' (IRB): 'From' (IRB): '5' / usr / local / rvm / gems / ruby-1.9.3-p392 / gems / Relations from -3.2.12 / Leib / Rail / Command / Console Rail / Order / Console in `Start 'with Rb: 47: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/ In 'Initiation' from RB: 8: /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.12/lib/rails/commands.rb41: `& lt; Top (required) & gt; Script / Rail: 6: In 'Required' from Script / Rail: 6: `& lt; Main & gt; ' Update:   

It seems that my access_token was restricted for 24 hours.

I was just able to add another 28 posts to the page before retrieving this error I tried this time with a 10sec sleep, but it was still banned ... I think I will try tomorrow with a 60sec sleep ..: Text after ""

I was not able to fix it but I have worked around it.

Uploading me every 3 minutes 1 200-300 days in a day. Was able to obtain.

  admin = admin.first page = FbGraph :: Page.new (admin.facebook_page_id) Story.where (: facebook_post_id = & gt; zero) .all.each Do | story | post = page .feed! (: Link = & gt; 'http://www.example.com/stories/'+story.cached_slug ,: ACCESS_TOKEN => admin.facebook_page_access_token) story.facebook_post_id = Post.identifier story.live = true story.Sleep 180 ended   

I hope this problem will help someone else.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -