I am able to use Messenger webviews on the IOS Messenger app (configured as described in the documentation), but in the desktop browser the webViews always open in a new page.
Am I doing something wrong, or does Messenger in desktop web browsers simply not support the webview display modes like "compact" or "tall"?
As of today, it is now doable.
To make a pop-up webview instead of opening a new tab, you will need to:
1) Set up proper X-Frame-Options HTTP response header to allow your pages within an iframe.
2) If the webview is to be opened from the persistent menu, you will need to set the value of the property "messenger_extensions" of the "menu_item" object to true.
Links:
https://developers.facebook.com/docs/messenger-platform/webview/extensions
https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/persistent-menu
Related
Is it possible to redirect the top level page from within the iframe of a facebook app?
I'm building a facebook application that will appear in a tab with the JS SDK. I've added a normal a tag that links to the facebook page of the company who's responsible for the app (https://www.facebook.com/) but when I click this link i get:
Refused to display 'https://www.facebook.com/Somersby?ref=ts&fref=ts' in a frame because it set 'X-Frame-Options' to 'DENY'.
It seems Facebook is blocking links in my application that redirect outside of the app's domain. Is there a way to redirect to the company page? Is there an API available to do this?
I misunderstood what was happening here. I forgot to add target="_top" to the link, so it was trying to change the source of the iframe, not the top level frame. It seems facebook can't be displayed in an iFrame, which was the source of the error message.
I have created an HTMl5 template in Facebook using the Static Iframe Tab. I don't really want other admin users - trying to download my content and stealing my work. Is there anywhere I can hide/prevent the URL links appearing for each page? When I hover on items on the Iframe, the URLs appear in the (Firefox) Browser window at the bottom? I would be grateful to know if there is a a way to hide them or prevent them being downloaded (i.e. just allow the the IFrame tab access?)
Not with HTML. But you could build your website in flash and have much better control over the content and linking.
This all sounds confusing;
I have a Facebook Canvas App with the same name as the Fan Page. I would like to add an iFrame tab to the Fan Page to promote and link to the Canvas App. My question is do I have to create a new app for the iFrame tab, or do I open my app settings for the canvas app and add settings for a page tab as well in there. Facebook don;t seem to have much documentation and they are changing things for app profiles soon, so I want to make sure I keep my fans of the page.
Thanks in advance.
Basically it goes like this.
You have an iFrame app.
The iFrame app has a canvas which is where you load your html for your app from your webserver with whatever language you want (.NET, PHP etc)
Then you can add this iFrame app to your page.
When you go to http://apps.facebook.com/yourappname
You will be shown the app by itself. When you add it to your page and load it via the tab on the menu of your page it will show you the app within the space on your page (an iframe).
You can use code to detect whether you are on a page or not to display different things.
I have created a facebook application that is used for posting a message to the wall. The application works fine. In the message I post there is a link. When I use the iphone facebook app and click this link instead of having Safari open immediately, the url opens in an internal frame of the facebook app and by click the small arrow it has the on the right bottom I can choose 'Open in safari'. This happenes only in iphone.
Is there a way to make my links open directly yo Safari?
Or is there a way yo get at least the facebook user-agent string so as to have a special treatment for this case?
Thanks in advance
I am working on web application with .net 3.5 using C# facebook SDK. Loading page inside Page Tab iframe with some information, and input button, on click of button i am doing auth.Authorize() with some permissions, FB Permission window opens fine, but once user click on allow button it is redirecting to application canvas page instead of Page tab.
Is there anything i am missing?
Regards
Imran
Answer is to set auth.ReturnUrlPath which will bring user back to selected tab in facebook page. If your application is being added to multiple pages, then you can find out current pageid from "signed request" and set correct ReturnUrlPath, and attach ?sk=app_YOUR_APP_ID as querystring to ReturnUrlPath so current tab will be selected. your return path will look something similar to : http://www.facebook.com/profile.php?id=YOUR_PAGE_ID&sk=app_YOUR_APP_ID (make sure you handle both http and https)
This worked for me, hopefully will work for someone too.
-Ims
Facebook C# SDK doesnt support tabs.
Only canvas apps are supported.