Facebook Permissions Request user Something Went Wrong error - facebook

I'm having some issues with allowing users to connect their accounts to my app.
Most users can do it fine, but some just comes back saying "Sorry, something went wrong." and this is for the same users all the time. I have two Facebook accounts, to test this, and one account is absolutely fine connecting, but another not really used account I use for testing, always fails.
For example, if Firefox is logged in to Facebook as User A, and IE is logged in to Facebook as User B, then copying the below link (obviously changing to the correct App id and the correct redirect_uri) works in Firefox, but in IE I get the "Something went wrong error"
http://www.facebook.com/dialog/permissions.request?_path=permissions.request&app_id=[MYAppID]&redirect_uri=[TheRedirectURL]&display=page&response_type=code&fbconnect=1&perms=publish_stream&from_login=1
Logging both out, and logging in each user into the other browser, the same user that worked before will work. So it's deffo not a browser issue, but down to the user surely, but no idea what.
Anyone got any ideas?

Related

How to make a Facebook Test Page have an Instagram Business account?

When you're trying to apply for Facebook Permissions for your application, you may encounter some permissions that requires App Review. In my case, I need to use the Facebook Login for Business Accounts, so I need to apply for Facebook's App Review.
In order to make an App Review for Facebook, you will need to provide step-by-steps videos and guides for Facebook testers to test for themselves. However, it does requires a Test User to do this.
A Test User can have a Test Page linked to it, and a Test Page is capable to link an Instagram Account created using this Test User. However, for some reason, I'm not able to convert this created Instagram Account as a Business Instagram Account using the Test User. I tried to link it using my application flow, but the "Convert to Business Profile" button does nothing, and if I try to do this in the Facebook Test Page account, the form that ask for Contact Information always throws a message "An Error Ocurred".
So, I'm unable to create an Instagram Business for testing and also not allowed to provide a real account because they don't allow this, as they explicitly says (Which I can agree with):
Note: Do not provide your personal Facebook account credentials.
As I'm unable to find a way around this, and I can't see to find any answer on the internet... I wonder if somebody could help with this one.
So, it seems it's just a Facebook bug (Just as one I was experiencing before this one, where after updating a Test Account permissions, the permissions were still not working properly) where the Test Account seems to be kind of locked in a state were you can basically do nothing more with it than what you have already done... So I end up creating a new Test Account and doing the same process, but this time it worked.
I had the same problem, and to fix it, I had to follow these steps :
Create a Facebook test user for your app.
Once the user has been created, click the three dots at the right, then edit its password, choose something that you will remember.
login as this test user.
Edit the user parameters and set its email address as main/default contact address (you need to type in the password of the user). It seems, by default, test user do not have default contact and this is required to login with instagram.
Now go to instagram.com, and create a new account using "login with facebook"
Fill in the name, password (you need to remember it), and userid.
Send the form, and you will get some error telling you to retry later. Ignore it, your account should actually be created.
Now switch to the instagram mobile app (web interface might not work, I was stuck in a redirect loop) so you can login to instagram using the email address of the facebook test user account (the one you used in point 4) and the IG password (you typed in point 6).
Hope it helps anyone stuck in this hell like I was for 2 days.

Drupal 8 - simple fb connect fails

So i'm developing a Drupal 8 site and I'm using the 'simple fb connect' module.
I've almost literally copied the code from Drupal to add a custom role to my new user and to get the facebook data and link them to my custom fields. Everything works fine until I actually try to register or login.
First let me explain how the flow works, so when you try to log in or register, you get redirected to the '/management' page ( This with the module 'Redirect after login' module). This page is only allowed for users with the role jobseeker. All this works perfectly fine with the drupal login and registration. Only with the facebook module, something goes wrong.
Judging by my log messages this is what happens when I try to login with the simple fb connect module.
The session opens normally, if the user hasn't already have an account, it makes a new one. The user already has the role 'jobseeker' assigned.
There's a redirect to the page '/management' (everything is fine up until here)
The page '/management' gets an error 'Access Denied', if I check my logs, drupal tries to access this page as an anonymous user... even though the user is logged in.
When refreshing the page, suddenly i'm logged in and have the role jobseeker assigned
This problem occurs not every time and at very random moments, sometimes after 3 login attempts and sometimes after 8.. Can someone help me figure out how I suddenly lose my user's role or how to avoid this..
SOLVED:
The module "Simple fb connect" conflicts with the module "Redirect after login". So I removed the module "Redirect after login" and just added the "Rules" module, to set my login-destination with a rule.

ASP Classic: twitter and facebook autoposting without signing in

In work I got a task (we MUST work with ASP Classic by the way): when user posts a blog, a link to that blog should be posted automatically on user's facebook timeline and in his twitter. I made everything working, but there is one problem: user needs to be signed in to post. I've made the cheking if he's logged in, and if not he must log in.
But I need to avoid the logging-in step and make it automatic (by sending user's username and password as part of the data sent to twitter/facebook or something like that), but I can't figure out how to do that or if it's even possible at all.
Any ideas? Would greatly appreciate any help.
P.S.: for the twitter part I used http://scottdesapio.com/VBScriptOAuth/
for the facebook part I used a combination of: http://snipplr.com/view/61108/facebook-app-login--authorization-entirely-clientside/
Everything works, but is it possible to automatize the user's sign-in part?
Finally I managed to make the both things automated...
The problem with Twitter was that I didn't store request token in session, that's why I got "Could not authenticate you" error.
Can't remember what I did wrong with Facebook (some co-workers helped me out), but I guess I didn't make proper http requests...
So the answer is: yes, it is possible to automatically post to Twitter and Facebook without user sign in.
If I am not wrong then your logged in user in facebook for current browser is not authorize for your app.
I think you should try googling about "How to authorize users into app". OR
If you don't mind I am giving you the direct URL to go to that setting page for your app:
https://developers.facebook.com/apps and then go to your app then after from left side bar go to roles and then after click on test user tab from top of page and then click on add button it will opne one pop-up to add a user.
In app you have to add test user for testing purpose and have to login for that added test user, so added user will be authorize for that app and you will be able to test.
Thank you...

CakePHP Facebook Plugin logged in as other user?

I am experiencing a very odd behaviour. I built my application with CakePHP and I use Nick Baker's Facebook Plugin.
When I log in, everything works ok. When somebody else logs in, again, everything works fine. But if someone logs in in the same time I am logged in, the correct User id is remembered in Auth for that User, but the Facebook data is taken from my account.
So, if I have User id 1 and John has user id 2 and each one of us logs in the application in the same time, the correct IDs are stored in the Auth Component (1, respectively 2). But if I visit a page which shows data from the corresponding profile, I see my picture and my Facebook data, but John also sees my picture and my data, instead of his.
Why is this happening? I really need help with this as it's beyond my understanding.
Thank you very much!
Do you have caching enabled? The web server might give a cached version of the page to the other user.
I have a similar problem and i think it is due to the access_token being saved in the user session. Since Facebook and my app reside at different domains the app session isn't destroyed when the user logs out from Facebook. I resolved this temporarily by calling $this->Session->delete('FB'); in the beforeFilter of my controller, like this:
public function beforeFilter() {
parent::beforeFilter();
$this->Session->delete('FB');
}
I think this makes the plugin request a new access_token on each request which is not optimal but works. Please correct me if i'm wrong.

Authenticate to Facebook without Clicking Facebook Connect Button

I have added Facebook Connect to my application via the JavaScript SDK. I'm using Spring Security (this is a grails app) and I have added code that when someone clicks the FB Connection button to login, I manually authenticate them against their user account and everything gets wired up appropriately. I have 2 questions:
When a user first logs in with FB and I don't have an account for them, I create an account for them with their FB info, generate a random password, and use their email for their login name. If the user then uses the regular login form instead of the FB button to sign in, how do I sign them in to FB as well?
Every time the user clicks the FB Connect button, the popup window shows up. If they are already authenticated, it just goes away and then my web site redirects correctly. How do I keep the popup window from showing up in this case?
Thanks
To you first question, the user might be connect on Facebook when landing on your page after registration. So you can rely on the Javascript SDK to help you out.
See here: http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
To your second question, I think you can't, except you might get a work around if you use the Javascript SDK mentioned for the first question!
This is how I did it for moviezine.se and it works just fine, but it might be a little irritating to be logged in without asking for it when you come back a few days later. Then there is the use case of the logout: if you are automatically logged in, are you automatically logged out too; and if not, what if your Facebook session is replaced by your girlfriend's one who is also a user on your site! :)