Detect if a Facebook user is using the "use facebook as" feature using the Javascript sdk - facebook

We ran into an edge case where someone using our facebook app opened a notification from a fb page they administer in a new tab. In the new tab they used the "use facebook as" mode as their page and when they came back to the app(different tab), app_requests started timing out and a refresh showed the "you are using facebook as.. switch back" prompt.
Does anyone know if there's a way to detect if a user has started using facebook with the "use as" feature as a different user? I would like to detect the change and then handle the change ex: window.refresh() so facebook will show the prompt.
I've played around with using the FB JS SDK's FB.getLoginStatus but I haven't been able to detect any changes in the response object when I replicate the scenario above.

Related

Facebook sdk4 php switch User feature

I am developing a site to manage Facebook Feeds and is using facebook-php-sdk-v4-4.0-dev.I have the user Login and access token saved to database functionality working properly.
I need to show Switch Facebook User account Option, If he is already logged into facebook account. Currently if he is logged into facebook account on another tab. There will not be facebook authentication, It just shows App Permissions window and then completes facebook login process.
But I found that this option is available in Facebook Login for the Web with the JavaScript SDK example...A pop up come up for Login and you can switch user on top right side.
Please let me know how to accomplish this in PHP sdk 4 or work around, or am I missing something here.
Thanks in advance....
Please see this screenshot
https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-xpf1/t39.2178-6/10574702_711575178930859_1600770327_n.png
I have added a screenshot where JavaScript SDK show switch user button (top right side)when user is logged in to facebook account in another browser tab.(this comes up as pop up)
But there is no such option when using php sdk. instead of pop up, its come as a webpage and it does not have switch user account.

Proper Facebook login for website

I want to allow people to log onto our website using their Facebook account. I noticed that when I click the login we added, the window opens displaying a detailed message and has a button which says Play Game.
On other sites I've seen a pretty simple window such as on CNet with a Cancel and Okay button on the bottom.
Did I setup something incorrectly on Facebook that is causing mine to be more complex?

Fbconnect Share dialogue like web browser in ios app

I am making an ios app in which i want share dialog box as below picture. I am using fbconnect sdk. I googled about it but doesn't get anything for ios app. So any help would be appreciate
Thanks in advance
This is not there by default in iOS Facebook SDK. Though you can create your own dialog box. Open a dialog box like this where user can write whatever he wants to share. Add a picture button to attach an image too.
Have a button saying "on your own timeline". Clicking on which open a popup view like in the picture you have attached. If user selects
1) On your own timeline - send the request using as "me/feed"
2) on a friend's timeline - open a window showing the list of friends(which can be retrieved easily using fb SDK me/friends with the permission user_friends). User can select a friend and then send the request "FRIEND_ID/feed"
3) In a group - open a window showing list of groups user is connected to (which can be retrieved easily using fb SDK me/groups with the permission user_groups). User can select a group from it and then send the request "GROUP_ID/feed"
4) On your page - open a window showing list of pages user is admin of (which can be retrieved easily using fb SDK me/accounts with the extended permission manage_pages). User can select a group from it and then send the request "PAGE_ID/feed".
It is not that difficult to create your own dialog box.
Hope I helped.

ui.methods permissions.request in share url

Earlier today I noticed a friend shared a Viddy video which made me curious. When I clicked on the share link I immediately got an authorization request dialog with custom text on the "next/login" button (Watch the movie). The URL for this share which triggered the behavior was this:
http://www.facebook.com/
connect/
uiserver.php?
app_id=125119214225766
method=permissions.request
redirect_uri=http%3A%2F%2Fwww.viddy.com%2Fvideo%2F2f44f934-bc2f-419f-b462-c46f261744ee
response_type=code
display=async
perms=email%2Cpublish_actions
auth_referral=1
fb_private_mode_enc=ASJbi0_rc8L9GhOWGzXF1eZQgqGW6WhIquDadvKiRi8uZRozkFn937vhtfsR_Krg8iM
I've looked around trying to find this feature documented. How am I suppose to generate such share URLs? I found some documentation on fbdevwiki.com, but that does not cover most of the arguments. If anyone could guide me to some documents I'd be very grateful.
That's an app using Authenticated Referrals so that users are prompted to grant permission directly on Facebook's chrome instead of landing on your app unauthenticated, and then bounced to an auth dialog and back to the app again.
The 'watch video' text in the auth dialog is because this app is publishing 'watch' actions in the Open Graph API
{edit} it appears the 'watch video' link is only shown for preselected partners and isn't available for all video apps
{/edit}
The generated url you see is generated by the app, you can achieve this by creating your own app and giving it the permission.
You can start by going to Facebook Developer

Facebook Connect dialog box

Our programer built a facebook connect feature on our website.
The steps:
1. User clicks the facebook connect
2. The user gets a popup with user/pass request from facebook
3. The user gets another popup to authorized the permissions and connect
I'm wondering how we can control the content on that 3rd pop-up pages.
Currently it says something like "Install MyWebsiteName?" I'm wondering if that language can be changed.
Thanks!
You can configure a lot of what the authorization popup does via your app settings. Goto https://developers.facebook.com/apps/APPID/auth and customize it there.
Languages can be done using the "Translate you app" link in the left column of that same link above.