Facebook: Updating page tabs through Javascript SDK - facebook

I'm trying to update my tab on a series of pages on facebook. Due to the volume of pages I'm making batch calls to keep from being rate limited. The batch calls work fine.
That being said, I'm trying to Update a page tab by making the call as stated here. I have the adding functionality working fine, and it's operating as it should. I use the same method of getting and using tokens, and I know moreso that it's not an issue as I have offline access so they don't expire (I get them every page load, but in reality could just store them and not worry about it).
Both calls use the same page ID, app ID, and access token and the call is good. The Error I receive is that the tab does not exist on the page, yet when I go to https://graph.facebook.com/PAGE_ID/tabs/APP_ID my tab is there showing itself as on the page. When I post to that I get the error it's not there.
My question is this: Has anyone gotten this working yet and if so what did your call look like and am I missing something?
I would post code, but it's incredibly long and intertwined in my program so it would be difficult to extract it.

There's a slight issue with the page tabs API at the moment that means in some situations you need to prepend your app id in the call with app_ so /PAGE_ID/tabs/app_APP_ID, give this a try and see if it works.

Related

Adding facebook custom tabs using URL method, no longer working

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

How Do I Get OneNote Pages to Appear After REST API Create?

I am creating pages in OneNote using OneNote's REST API. For the most part, it works well. However, some pages never show up. According to their HTTP response code (201), they all POST correctly, but no matter when or how many times I run the program, some pages (always the same ones) never appear. Sometimes, if I wait a very long time (e.g. days), a page will finally show up, but usually it disappears again after a while.
Example: if I were to upload 10 pages, I might have 5 that appear in OneNote Online right away, 3 that appear after ten minutes, and 2 that never show up at all (no matter how much I sync), even though they all post to the same place, have unique names, and all return response 201.
If I send a GET request using the ids of the missing pages and include FavorDataRecency: true in the header, the API returns that no such page(s) exist. However, if I leave that header off, then the API returns that they exist as well as their information.
How can I get them to show up?
Update Note: If I delete the sections I'm uploading to and recreate them, then run my program, all the pages POST fine. I have yet to determine if they'll continue to post fine in subsequent runs. For now, it seems to me like something in the way OneNote indexes or caches the pages might be part of the problem. Thoughts?
The symptoms described above:
POST succeeded
Pages do not show up in GET calls
Pages do not show up in OneNote
Imply that your pages did not actually succeed to be created - here are my asks/suggestions:
Ask: Send us the value of the X-CorrelationId header on one of the POST page responses where this symptoms occur so we can debug this.
Suggestion as improvement/temporary workaround: You can retry the POST calls after seeing the pages don't appear.

get facebook page full public photostream

there's only one similar question and it's not been answered. not for me at least.
There are public pages on Facebook, suppose i want to get their photostream ? their album pictures ?
I don't see how the Graph API allows me access since i can't get an access token, if i browse from my browser, NOT LOGGED IN, i can still see this public information, so how do i use the AI to access it.
BTW, i tried scrapping with python+mechanize and it's no go as if u get the regular we photo stream u get only partial, no all of it and the rest you need to scroll or to know how to build the same request the browser is building, but suprise suprise the JS doing the request is obfuscated pretty well...
Any help ?
in short it's not possible to do what i wanted annonymously, moreover at the moment, only some of the API works in the web site by accident only, if u are not logged in FB do not want to let u see any page and anyone, considering the last article about their cooperation with the US gov. it's not surprising.
In any case i just use grease money and FF to get a full page\album and then download the whole thing and i i need scrapping i'll do it on those pages with a script.
basically if i log in i can get a full page using the scripts in script monkey.... though script monkey is easier since he has the browser to parse all the data and works inside the browser...
I gave up after 3 weeks...

Tab Content Does Not Refresh After First Click of Like Button

I've implemented a very simple "like guard" for a facebook tab, and am running into an issue with my test users. Multiple testers are reporting that when they open a tab and click the "like" button, they do not always get a page refresh (so the like guard does not disappear until they do a manual reload). This is using facebook's like button at the top of the page, not one I've coded up myself.
As a sanity check, I enabled some simple logging on my server and have been able to recreate the issue - I hit "like" or "unlike" but there seems to be no request made to my index.php page, so definitely no refresh happening.
I'm aware of this old bug https://developers.facebook.com/bugs/228778937218386 but this one seems different. For starters, after the first click of the "like" button, if I just continue clicking unlike/like/.... then the refresh happens automatically, as expected. What's especially weird is that if I reload the page after the first failed refresh, the refreshes start working again as expected, ie the first update to my like status triggers a page refresh.
Some possibly (?) relevant info:
My Tab is part of a test page, and is unpublished
I am only using http hosting for the tab content, since my https isn't set up yet
So far I've just tested with other admins - so maybe user role affects this?
Curious to see if anyone has run into this issue before.
Finally settled this problem, sharing in case others run into the same issue:
My confusion was caused by where I created/assigned my testers. I made a dummy community page to host the tab I was building and I added all my testers to the test community page. I realized that the only users not getting the weird refresh problems were those testers who I had also added as admin/testers for the app itself. Apparently, adding them as testers to your community page is not enough, and rather than giving you some kind of warning when they view your tabs, testers just get this buggy refresh behavior.

Creating a new facebook application, no signed request is being sent through. Old app works

I have just created a new facebook application to use in a page tab. When I check for the signed_request it is empty.
So I checked another app that I have done in the past. It is on the same server and the only difference in the setup is the dir name.
http://example.com/app1/ works
and
http://example.com/app2/ doesn't
So I tried swapping the tab URLs in the apps over and app1 still works with app2s URL.
This lead me to believe there must be a problem with the way I have set up the application.
So I went through all the settings and made sure they were the same. They all are, except there are 2 that are not available on the app I just setup. They are "Encrypted Access Token" and "Requests 2.0 efficient" neither of which seem to relate to the problem.
I seem to remember in the past there was an option to pass through the signed request to canvas page, but I can no longer find it.
Has signed request been deprecated? I couldn't see any mention of that in the docs.
Any help/comment appreciated. Otherwise I am going to have to go back and re-use old apps with new content in them, and I only have about 15 more before I run out.
Cheers
Alex
No, it wasn't deprecated.
There can be 2 issues that could cause this
You must have a trailing slash or a specific file on your page tab url.
http://myapp.com/app/
http://myapp.com/app/index.php
Your server for the second app is redirecting the request which causes it to lose the POST variables.
You should check if there aren't any redirects which usually occur form mod_rewrite. (.htaccess and such)
This seems to have been resolved now, I can no longer replicate it with new applications.