Facebook Page Tabs position attribute stopped working - facebook

According this Facebook page tab documentation you can update the 'position' of the Tab by calling a http post as follows :
https://graph.facebook.com/v2.5/{pageId}/tabs?access_token={pageToken}
At this endpoint you can update a Page tab's position with the POST request, passing the parameter tab=TAB_NAME&position=TAB_POS.
This has stopped working recently (perhaps since Facebook rolled out page templates for Admins).
I am able to update the custom_name and image for the tab. And I can also see the 'position' attribute for the tab is changed to the new value. However the actual position of the Tab on the page does not change. Earlier calling the above post, would actually move the tab within the list of other tabs.
I am looking for help on what is the new way to change the tab position.
Thanks.

Facebook have acknowledged this as a bug on their platform and are close to deploying a fix : https://developers.facebook.com/bugs/1302804313113666/

Related

Facebook Comments with Ember Views in Subroute

I am trying to add the Facebook comment plugin to one of my subroutes, but the problem is that it is only shown when I refresh the page. As soon as I navigate somewhere else (= the view in which I added the snippet is removed) it is gone. Meaning when I navigate back to the same route, the Facebook Plugin is not reinitialized.
Is there a way to prevent it from being destroyed or maybe do some "FB.Init()" on route activation?
If you're using XFBML you can call
FB.XFBML.parse(document.getElementById('foo'));
Or call it without parameters, to do it on the entire page.

Can't add page tab to Facebook page - get no prompt to add page

I relate to this well known Page Tab Tutorial by FB: https://developers.facebook.com/docs/appsonfacebook/pagetabs.
The third step, after filling of page tab info and adjusting of the tab width is getting a prompt to select a page, to which the newly created tab will be added. But i don't get this promt, like it's written in the tutorial and seems to be the normal case for all users.
After i edit tab details and press "save changes", the page reloads with "saved"-message, like on this screenshot,
and i see no further given possibility to add created app to any of my pages. If i go into the administration area of any of my pages, in the tab "apps" is this newly created app not present, so i can't add it from there too. What i'm doing wrong? The solution must be simple - i go crazy:( I tried it with Firefox and Chrome, setted off all popup- and adblockers - nothing goes...
Thanks for ideas and advice!
Evgeniy
The "manual solution" to this problem has changed. While logged into facebook, visit this link in your browser:
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&redirect_uri=YOUR_URL
There are two parts of this link you must change before it will function.
YOUR_APP_ID: Find this in your app settings or app dashboard URL. It's a long number, 16+ digits.
YOUR_URL: Use the URL of the content your new tab page will call, ie "Tab Page URL" as entered in your app settings.
This newly modified URL will load a page with a dialog where you can choose which of your Facebook Pages to add the tab to.
These instructions appear here but they are far from clear. Good luck!
For anybody who will look for solution:
to add a page tab to any page do it manually: edit a link
http://www.facebook.com/dialog/pagetab?app_id=HERE-COMES-APPID-OF-YOUR-PAGE-TAB-APP&redirect_uri=http://www.facebook.com
fill into the link the app id of your newly created page tab and run this link in your brwoser: you will get a site with the prompt from the first image i cited in the first post. There you will be able to select one or, with pressing SHIFT, many pages to add your app/page tab.
You must choose "PAGE TAB" in the dialog ! ! !
see the TUTORIAL here: https://stackoverflow.com/a/35287477/2377343

How to find if web page got appended using chrome extension

I am new to chrome extension and I am trying to find whether page content got appended.
For E.g. in Facebook, we can see the content will appended automatically when the user scroll down the page.
I have the following code in background.js
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
alert("page is appending....");
});
The above code is expected to fire when the page got updated. But, I am seeing that it is getting called only for few times. Not always.
Or Am I making any mistake here ?
My requirement is, whenever the web page appended in facebook, I have to do get the page content and obtain few string from the same.
Thanks in advance.
Your onUpdated event is in the chrome.tabs namespace on purpose, it listens the updates of tab's general attributes like: the tab pinned, the favicon changed, the URL changed, see the documentation (also check the update() method). So this way is not workable. Instead listen the DOM tree change with DOMSubtreeModified event or MutationObserver.

Wicket page versioning and history support

Could anyone explain me what is the Wicket's page versioning useful for? There is an article in the FAQ that is related to this topic:
Wicket stores versions of pages to support the browser's back button.
Suppose you have a paging ListView with links in the ListItems, and you've clicked through to display the third page of items. On the third page, you click the link to view the details page for that item. Now, the currently available state on the server is that you were on page 3 when you clicked the link. Then you click the browser's back button twice (i.e. back to list page 3, then back to list page 2, but all in the browser). While you're on page 2, the server state is that you're on page 3. Without versioning, clicking on a ListItem link on page 2 would actually take you to the details page for an item on page 3.
But unfortunately I don't understand it at all. When I click on a ListItem on page 2, I would expect to get to the page defined by that Link - details page for the item. Why should I get on the details page of the item on page 3?
Moreover, when one press the back button in a browser, it doesn't call the server at all. Is it right?
So how this versioning works?
No, the server is not notified when you press the back button. I'll try to explain what happens in the example:
You access you application for the first time. On the server, a page 'list' is created, used to render the HTML you see in your browser, and stored as page v1. You see the first 10 items of the list.
You click the 'next' link, and it refers to a link in page v1. On the server, page v1 is loaded, the link logic is executed (to advance the pagination), the page is used to render HTML, and is stored as page v2. You see items from 11 to 20.
You click the 'next' link, and it refers to a link in page v2. On the server, page v2 is loaded, the link logic is executed (to advance the pagination), the page is used to render HTML, and is stored as page v3. You see items from 21 to 30.
You click the 'details' link for item 25, and it refers to the link for the 5th item in page v3 (this page only shows 10 items, and the link, even if it refers to the 25th item in the complete list, in this page it's just the 5th). On the server, page v3 is loaded, its logic is executed, page 'detail' is created, stored as page v4, and you are redirected to it. Your browser requests page v4, the server loads it, and uses it to render your HTML page (no new version is stored, since it's just rendering). You see the details for item 25.
You click the browser's 'back' button 2 times, and see page 'list' showing items 11 to 20, referring to page v2 (list). Then you click a link 'details' for item 13. On the server, page v2 is loaded (not v4, the last one executed), since the link clicked pointed to this page version. Then, the 3rd item link's logic is executed, a new page 'details' is created, stored as page v5, and you are redirected to it. The browser requests page v5, the server loads it, and uses it to render your HTML. You see the details for item 3.
All this may seem strange if you come from a Struts-like background, where you always just put the item id or which page to show as a link parameter. In Wicket, the usual case is to store all state in the server, and navigation is not done by the client (direct link to another page passing parameters), but in the server. A link just asks the server to execute code in a page object version, the navigation is done all server-side.
You could argue that the Struts style is simpler (and you can do it in Wicket too, it just isn't optimal), but keeping the state only in the server has many advantages. Fist, once you get used to it, it's actually much easier. No need to add every single param to a pagination link (search parameters, first item, page length, sorting column, order direction, etc.). Also, you avoid many security issues (you can't just change the URL id param to an arbitrary value and access other users' data), and can control everything from Java code instead of mixed Java-Javascript (you still can do it if you want, though).

Facebook: Custom Landing Page "For Fans"

Facebook provides us with an option to choose a custom landing tab for the new visitors (i.e. non-fans). Can we have a custom Landing tab for fans so that every time i open the page, i m directed to that custom page rather than the Wall..
Have you checked Facebook Help Center?
How can I select a tab as default for people who already Like my Page?
This functionality does not exist.
What you are trying to do is straightforwrd.
Create a "landing page" tab app and add it to your page. Here is a tutorial on how to do it: http://how-to-create-facebook-app.koliber.com
Make this tab the default for your app. On your page, in the upper-right corner click "Edit Page" and change the "Default Landing Tab" to the one you would like displayed by default.
Now everyone will be shown the default tab when they log in. How to distinguish between those visitors who "liked" your page and those that didn't? Easy. Make two versions of the page and display one to those who liked and one to those who didn't like. How to find out whether the current visitor liked your page or not follows:
When your Page Tab URL is called in the iframe, it is passed a signed_request POST parameter. This parameter contains the info you need. However, it is encoded and structured so it needs some processing to get the info
Split the signed_request on the '.' character. The first part is the signature. The second part is the encoded_data
Decode the encoded_data into a JSON string using the URLBase64Decode function equivalent in your server-side programming language
The JSON object contains a node called "page". This contains a node called "liked".
If "liked" is true, the user liked the page and you display the "liked" version of your app. If false, show the "Please like me" version of the site.
This way, when visitors visit your page, they see your custom app in a tab. The actual content is determined server-side on your server based on the page.liked property inside of the JSON object passed to you in signed_request
The simple answer as far as I have been able to find out is "No". There is no setting which aligns with this requirement.
The wall is the default tab for people who like the page.
http://apps.facebook.com/static_html_plus/ this application gives you those options... enjoy!