How detect if user view app in facebook frame or not? - facebook

I have disable scroll in my app, so there is only scroll from facebook - it looks cute and I like it, but if came to my app directly on site, there is also no scroll bar. I tried to detect if user load page with url http://mysite.com or http://apps.facebook.com/myapps, in both ways I get the same direct address link, so I cant detect if user view my app via facebook and I need to hide scrollbar or view it on site and I need to show scrollbar. So is there a way to detect how user view my app?

What server side language are you using? If you are inside the facebook iframe, your page will be requested with a post variable set called signed_request. You can check if that has been set in your code, if it has you know you are inside the facebook iframe, if it's not then you are on your site. From here you could either conditionally change your css to allow the content to overflow properly and get scrollbars, or redirect them into the facebook app.

Related

How to change the facebook ui feed size?

I have included share button in my website. The share button works fine in web browsers.
But when access through mobile, after clicking the share button, the share popup size is same as web browser. So it is not getting displayed properly.
Can anyone please suggest, how to alter the height and width of the feed popup?
Thanks.
Afaik you cannot change the appearance and size of the popups made with FB.ui. You could try opening your own popup:
https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.0
See "URL Redirection".
One other possibility is to use the "sharer.php", it is even easier to handle because you only need to add the URL as parameter and it will automatically get the Open Graph data from that URL.

iOS UIWebview facebook sharer.php catch share event

We use sharer.php in a UIWebview in our app, since it enables very easy sharing with customized title and text and thumbnail without having to go through the process of setting up (and maintaining!) a facebook application (and we'd like it to stay that way).
Only problem is, that we'd like to programmatically close the UIWebview once the user clicks the share button.
is there a way to get notified in the iOS app about the user clicking the share button?

Facebook multi-friend request always highlights first user

I am working on an app for iOS. I am using the facebook multi-friend request dialog. I am using it in the touch display mode, and it's being loaded in a UIWebView.
When the dialog loads, the first friend in the list is always highligted, even after I select some friends. This makes it look wrong when selecting users.
Is there a way to change this behavoir, so that no friend cell is highlighted until you tap on the cell?

Facebook Fan Gate Page with jquery overlay

I'm basically creating a 520px wide welcome page for Facebook which I will upload onto the server and then Iframe it into a Facebook fan page. I'm doing this using HTML, CSS and JQuery rather than the old FBML method.
I've seen a lot of companies using an overlayed image to tease the user to 'like' the page. Once the user have liked the page, the content underneath is visible.
Examples:
https://www.facebook.com/redbull
https://www.facebook.com/smirnoffus
Red Bull - when the like button is triggered the transparent image is hidden to show content underneath
Smirnoff uses an image to give the illusion that the image is overlayed on top of the content. Somehow when the like button is triggered, the image is swapped for content.
Can anyone shed any light on how this can be acheived? I don't mind which one - Smirnoffus looks easier but might be a pain as everytime I update the content, I'll need to update image too.
When a user likes your Facebook fan page, Facebook will reload the whole page. You can then use server code to inspect the signed_request post parameter that they will send over. This question has an example code of how to detect if they liked the page in server side code.

Facebook iframe app with fullscreen popup?

With a Facebook iframe canvas app, is there any way to launch a modal pop-up (such as when clicking to magnify a photo, similar to http://fancybox.net/) that extends outside the bounds of the iframe's width? I'm thinking there would have to be some sort of communication with the _parent, but I'm not sure what's allowed or how to approach this.
In short, you can't.
Your application lives within an iframe within Facebook. You can't alter Facebook's code outside the frame (against their policy).
You can pop up a new browser window in full screen, if you'd like. But I'd question that as far as user experience goes.