posting requires a permission login dialog to appear twice - facebook

I am developing a mobile camera app that allows posting a photo on facebook. The camera app is a stand-alone and does not require facebook login when it starts. However I want to allow posting a picture to facebook. It follows that the first time a user will try uploading an image it will have to go through the permission login dialog twice.
I cant find a way to ask the user for access his basic information + posting of an image on his wall with one login dialog.
This seems "by design" if you read: http://developers.facebook.com/docs/concepts/login/permissions-login-dialog/
Its a bad users experience to be transfered in and out the mobile app twice in a row to allow posting.
Is there a way to ask the user for basic information + posting of an image in one pass?

Do the following steps :
1) Go to https://developers.facebook.com/apps
2) Click on your app.
3) Click edit app
4) Click Advanced
5) Check Enhanced Auth Dialog: Disabled
That's it. You have one authentication popup.
You get two pop-ups because one of them is a basic permission popup for the app while the other popup asks for extended permissions i.e. publish_stream to post a photo on behalf of the user. For more info on facebook permissions, go to : https://developers.facebook.com/docs/reference/login/

#Oriel Bergig Facebook update the sdk.
(v3.0.1 as of March 20, 2013. See what's new in 3.0.). Download from this link .
https://developers.facebook.com/android/
Follow the link
Problem is solved .If any issue ping me.

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.

Getting Facebook publish_actions Permissions

If this is the wrong place to ask this - I super apologize in advance, I'm at a loss here.
I'm trying to develop a simple Facebook PHP app and I'm having trouble getting publish_actions. Here's how the app will work:
You enter your email address
Periodically, you receive emails like this ("Hey nice person, here's a video we think you might be interested in, click here to share it on your wall")
You click the button, it takes you to the app site, which asks for your publish permissions
You enter a message and share the video to your wall.
My problem: all of that requires publish_actions permissions, but FB won't grant them to me until I can show a working app (I applied for permissions and was denied because "Canvas
Your app isn't loading properly and errors appeared while testing your app").
My question: How do I get access to publish_actions without being able to show a working app (which requires publish_actions)? Can I use PHP to post to my own wall in development mode somehow to test it out?
Again - I apologize for the dumbness of this question, I am a PHP dev who is very new to FB, and I've looked everywhere for answers on this.
Try using the Facebook Graph API Explorer
You will be able to simulate some of the app permissions as if it was production.
Just go and select your app, then select Get User Access Token, finally select all the permissions you want to test.
Use the given token to develop and test things out and when you have a semi finished version, submit it through the app review section, following the Facebook App Review Guidelines
I submitted screenshots, a video of my app working, and step by step description on how to reproduce the publish action.
Hope it helps.

Facebook logout when not authorized

I'm building a public installation using an iPad, built as an iOS web app (using the "Add to Home Screen" functionality) which is going to allow users to share content on Facebook.
I'm currently logging the user in to Facebook and getting them to authorize my Facebook app when they click my custom share button. On a successful login, I open Facebook's Feed dialog and allow them to share. Once they have shared (or clicked cancel) I automatically log them out, making sure that the next user that uses the public installation won't be able to share to the previous user's Facebook account.
This all works well, but things get tricky if someone was to hit my custom share button, log in to Facebook and then not allow my app. This would mean that they have logged in, but as they haven't authorized the app, I don't have an access token, and so can't log them out (FB.logout() requires an access token).
Is there a way around this?
Or is there another way that I can log a user out?
Or is there a safe way to allow a user of a public installation (built in HTML) to share on Facebook and be automatically logged out afterwards? Would building a native obj-c app, and using Facebook's iOS SDK help?
The best I can think of is that if the user logs in but doesn't allow the application, they are told that they need to log out, and redirected to Facebook to be able to do this. However this offers them the chance to browse Facebook and (through shared links in their feed) the whole Internet - this isn't acceptable for our installation.
I solved this problem by creating a native iOS app, where the Facebook share link opened in it's own UIWebView. And once the sharing was complete, I deleted all session & cookie information, effectively logging the user out.

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

create auth permission dialog in facebook

basically i have integrated fb in my app and for that i have created the app in fb developer site.
I have got app id and i have authorized my app with fb using this id.
While asking permissions in fb, the auth dialog havn't appeared good. like i want to display auth dialog as below image.
but i didn't see above style of auth dialog while authorization. How will i get that style of dialog?.
Currently i am getting the below style of dialog.
Please advise in this regards.
Thanks!!!
Go to your facebook profile from which you have created your app,or from which you are accessing your app.
Then go to Privacy Setting -> Apps, Games and Websites
And here go to apps you use there click edit in front of your app and then remove it.
It will simply remove your permission and will ask you again as you have shown in screen.
If anything feel free to ask.