nov / fb_graph

This gem doesn't support FB Graph API v2.0+. Please use fb_graph2 gem instead.
MIT License
1.04k stars 191 forks source link

Tab creation docs are incorrect #341

Closed davefp closed 11 years ago

davefp commented 11 years ago

According to the tabs section of the fb_graph wiki, page.tab!(args) returns the newly created tab. Whilst true for most connections, tabs seem to be a special case.

In the FB docs, we have the following:

screen shot 2013-10-08 at 8 56 20 pm

So how do we get the tab we just created?

There's another method call that I can't see support for in fb_graph for this. Calling PAGE_ID/tabs/APP_ID gives you the tab your app installed, if there is one. (See the docs again, under 'Testing App Installs'.

Support for this method should be added and the new tab creation/retrieval flow be added to the docs. Something like this would be ideal:

if page.tab!(args)
  tab = page.tab_for_app
else
  #raise an exception or something
end

I'm going to start looking at implementing this, but any advice would be appreciated.

nov commented 11 years ago

Ah, the wiki was wrong. And fb_graph doesn't have PAGE_ID/tabs/APP_ID function yet.