In the Facebook graph api explorer I am trying to add a new Tab to a fanpage according to the documentation.
So I make a POST to /pageId/tabs with the field app_id and my app's ID as value using the page access token I got when querying userId/accounts. The access token includes the manage_pages permission.
I get the result true which is supposed to mean, the create was successful. But if I run a GET on pageId/tabs the newly created tab is nowhere to be found.
Am I missing something? Shouldn't it have created the Tab if it says "true"? Has anyone done this and can tell me how it worked for you?
Thanks!
I created a specific bug report
And this one seems to be related
Wow, so this is a perfect example of how important a meaningful error message or in this case ANY error message at all is.. Dear Facebook API developers, please get your act together, this is just one of many examples of inconsistency!
What the error message should have told me is "This app is not designed to be added as a tab" (As btw is the error message when trying to add it with
http://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL
Because when I set the app settings to "tab" instead of "app on facebook", everything works fine! Sigh! Admittedly I could have done this right initially but who is infallible?!
The Graph API call simply should not return true if the request fails!
Related
we can still add some of our custom apps to customers pages.
every now and then we get a content error when using the URL method as below
http://www.facebook.com/dialog/pagetab?app_id=xxxx&next=ScriptURLxxxx/exec?tabpage=TABNAME
This works 99% of the time, although a new onboarding we receive the error "Content is not available right now", I then tried this same method on another page and worked fine.
Below is a method I found on Facebook Dev page. Although for the life of me cannot get it to authenticate when running the Curl commands with correct variables.
Has anyone had this whilst adding Facebook Custom App Tabs
Thanks
I am building a Facebook Application that sits in a facebook page tab (and has a Canvas URL hook.) I am trying to implement the app_non_users filter.
When I introduce the filter, here is what I see:
In both ['all'] and ['app_non_users'] everyone is shown (including those who have authorized the app)
In ['app_users'] setting, no one is shown.
I am not running this on mobile, and I am passing the parameter in expected JSON form (proved by the fact that Facebook is doing different things for different values.)
I am also not using any other conflicting filters or even the "to" parameter. When I inspect the network tab, I see the following params being passed to FB:
message:Invite Message
title:Select from list of your friends
filters:['app_non_users']
api_key:xxxxxxx
app_id:xxxxxxxx
locale:en_US
sdk:joey
display:async
frictionless:false
redirect_uri:https://xyz.com
__d:1
__user:xxxxxxxx
__a:1
__dyn:798aD5z5CCU-wEbw
__req:9
Based on the above results, it seems to me that Facebook doesn't consider just app authorization to mean that a user is a app_user. So, exactly what makes a user app_user and how do I, as a app dev, make that change?
From the question I think you are using the filter alone without any other filter for the Request dialog box. If that is correct then follow the bug here as it points to the same issue as you are having.
As an alternate, until the bug is fixed, I might suggest you to use more than one filter so that both of them work correctly. I tried the same with RELL here.
I made workaround using 'exclude_ids' parameter and server side PHP.
Usng PHP I have populated exclude_ids with ids of current user's friends which already entered my app (I have those fb ids in my database), so Request dialog doesn't display those friends to user.
according to fb's documentation (https://developers.facebook.com/docs/reference/api/page/) i don't need a user_access_token to retrieve the notes of a public page, an app_access_token should be enough. however, when i sent request like https://graph.facebook.com/starbucks/notes?access_token=my_app_token, i got the reply that a user access token is required.
my questions are:
did i misinterpret the documentation?
anyone else has the same problem?
anything i can do about it?
thanks!
Indeed there's something wrong in the notes connection. I honestly don't think that there's a wrong info in the documentation (but a bug in this specific connection).
I see a reported bug about this issue (reported by you?), but with a funny response from Facebook! Obviously the guy is just copy/pasting this "standard" official response and closing bugs randomly!
EVERYONE READING THIS DO THE FOLLOWING:
Create a public page (or use an existing one)
If the Notes app is not added to your page, Edit Page -> Apps -> Locate the Notes app and Edit Settings -> Add tab
Now add a test note
Go to the Graph API Explorer
Choose one of your apps and GET the page's notes to see the current note: /page_id/notes
Go the to the Access Token Tool, copy that app access_token and replace the one in the explorer with it
Result:
{
"error": {
"message": "A user access token is required to request this resource.",
"type": "OAuthException"
}
}
If this was reproducible, then subscribe to the bug and confirm by clicking on "Yes" for the reproducible question.
Access to certain Pages may be restricted based on demographic information such as the current user's age or location. Access may
also be restricted to only a Page's administrators.
Based upon your findings above, as well as this quote from the documentation link you shared above, this tells me that maybe Starbucks is only allowing their page admins access to the notes connection of their page.
Try creating a page yourself, play around with the various settings and see what is available with and without tokens. Shouldn't take you too much time.
in the permission selector popup i can't find the user_actions permission checkbox. Is that quite normal ?
I want test this kind of request /me/music.listens or /me/music.playlists for a future app.
For now, the return give me an empty array.
Thank you
Look at this URL: http://developers.facebook.com/docs/opengraph/permissions/
It shows you how to request permissions for a specific action or a specific app along with some sample code. Once you get the token you can check it's permissions using the debug tool here: http://developers.facebook.com/tools/debug
You can use the DOM inspector to change the name attribute of one of the permission checkboxes that you don't need to "user_actions.music".
I'm trying to use Facebook Send Dialog in a WinForms frame with a browser control and direct URI (you can repro just by clicking the links below). It works fine with link=http://www.foo.com, sending the message properly if you enter a message and click "Send":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.foo.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
However, this fails with link=http://www.facebook.com or any path under it. Clicking "Send" just gets you "Sorry, something went wrong. We're working on getting this fixed as soon as we can.":
http://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com&redirect_uri=http://jonnewman.com/&display=popup&to=100002395463043
The aim is to write a script to make it easier to send messages asking all users in a particular group to a page (prepopulating the recipient list). Since Facebook has restricted groups larger than 500 members, our organization has to move to a Facebook Page, and I want the Send Dialog to link the new Facebook Page. Why won't this work? Is there a workaround? Are there other criteria for what links Send Dialog will and won't send?
Also, is there a way I can determine whether the send occurred or not, for example an event to catch? Whether you send or cancel, the Navigated event is still redirect_uri/#_=_.
Once I have Send Dialog working, I will add Show-FBSendDialog to Facebook PowerShell Module, which already has numerous capabilities to automate Facebook from PowerShell.
ran some tests and it seems it is blocking any fb domain http://on.fb.me/91S2P8, sometimes this is temporary otherwise need to rethink...
I see your second link isn't working... but if you add your company page id or name to link it should work. following link works for me:
https://www.facebook.com/dialog/send?app_id=179873125388138&link=http://www.facebook.com/Intel&redirect_uri=http%3A%2F%2Fjonnewman.com%2F&display=popup&to=100002395463043
hope this helps
I got solution. I also had same problem. No post helped me. Solving error for 2 days.
There were posibility of two mistakes(that was done by me).
Link Parameter given in url should be working. I have linked to api namespace but not given SSL url. So it was giving problem. You can given your web site address.
And redirect_uri parameter should be working. Try to give redirect_uri to same page most probably.