Remove Facebook code query parameter [duplicate] - facebook

This question already has an answer here:
Removing the 'code' parameter from URL - Facebook connect PHP
(1 answer)
Closed 8 years ago.
I'm using Facebook authentification in my web app.
I have a URL of the type : https://www.facebook.com/dialog/oauth?client_id=123456789&redirect_uri=http://myapp.com/#story
It works really well but when the user is redirected to it, there's a query parameter that's added (for ex : http://myapp.com?code=AQCkHq--XXTngRCMgQxAAHExCaWzw5XYadd8vaVMytX91aPEc74oQWMBlyrr_HQUjBcC53sf_bREFz5cOBaFdgfvHSpWk1W0abbQA9ncbc0KQ0vyH6B1H37WXv1wcejblMQ6cTVLS98f4xvz-keiPgDJSh1v-Cyw-ACUFvAvs2yusHaSnfjITVZLDWQnNhBwpoELWFlJ75WAl0OrwD1_snZkQ2QQfL_5rcG2ZmpI9ORmFtFW-mrWEouA1zOiPSyTbP2d2LajGz82_KJuV5LBaFkULZ4mYSdALphPjvfwJkhrSQy7n_xKXGOfgr056bkqOIA#story;id=219012)
Is there a way to remove that long string from the URL?

It seems that when you add the response_type=token parameter, it's gone. ;-)

Related

flutter firebase storage issue with image url [duplicate]

This question already has answers here:
Download URL not present in Firebase Console
(3 answers)
Closed 2 years ago.
hello iam new to flutter and firebase , I'm making an ecommerce app using firebase and I want to store images manually in the console in the storage and then retrieve it with all the product value that i have stored in the firestore database , when I upload a new image to my storage there is no url for it , how to get the url and then put it as a string in product document nd get it in flutter ?
If you go above the "Size" segment, you'd see a "Name" field that has Hyper-Link on it.
Press on the name and it would transfer you to the URL of the photo

facebook graph api get names on feed [duplicate]

This question already has answers here:
Facebook JS SDK's FB.api('/me') method doesn't return the fields I expect in Graph API v2.4+
(4 answers)
Closed 6 years ago.
So I want to use the api but when I use /{event-id}/feed
I get the follwing:
* message
* date
* id
But what I also like is the name of the user who posted the message. How can I achieve this?
The API-References says that you get An array of Post objects as result.
These Post objects contain detailed information about the message.
For example the field "from": Information about the profile that posted the message.
If the creator of the message is a normal user, from will contain an User object. This object contains the fields first_name and last_name.

Facebook OAuth SSO Issue

I have a JavaEE Application. I am trying to implement OAuth.
But I am facing some strange issues:
As per the documentation to manually building the sign in web flow I have to provide a link like this https://www.facebook.com/dialog/oauth?client_id=1231298371123&display=popup&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fc%2Fportal%2Fauth%2Ffacebook_login%3F&scope=email,public_profile,user_birthday&response_type=code%20token which will open the dialog. But the dialog is not opening.
And when the SSO is successful FB is redirecting to the url given above but the problem is FB is appending the query strings like state, code, etc with #. Something like: http://localhost:8080/c/portal/auth/facebook_login?#state=ASDASDASDASD&access_token=EAANXZAlBTi........ Because for this I cannot get the parameters in Java.
Do any one came across this kind of issue.
Please help.
Not sure if I understood the question right but if you want to read the string after # you can use the following code
URI uri = new URI("http://test.com/#something=some");
String fragment = uri.getFragment();
fragment will be everything after #

Facebook "me" node information [duplicate]

This question already has answers here:
Facebook JS SDK's FB.api('/me') method doesn't return the fields I expect in Graph API v2.4+
(4 answers)
Closed 6 years ago.
I'm trying to get my information with the Graph API node "me" using the Graph API Explorer to make some tests.
If I use the version v2.5(latest) only "id" and "name" fields are retrieved.
But if I use the v2.3 or earlier versions, more information like "birthday", "first_name", "gender", "last_name" are retrieved.
I need all information like older version but want to use the latest one. What must I do different?
It is called "Declarative Fields" and came with v2.4. You now have to specify the fields you want to get, or you will only get the id and name:
/me?fields=name,first_name,last_name,birthday
Of course you have to authorize the user with user_birthday to get his birthday.
Changelog: https://developers.facebook.com/docs/apps/changelog#v2_4

Facebook authentication within a Page Tab

According to the specification here: http://developers.facebook.com/docs/authentication/pagetab/ I want to autorize user with the server-side flow on page tab. I use PHP-SDK.
My redirect_uri parameter is build like that:
https://www.facebook.com/pages/null/PAGE_ID/app_YOUR_APP_ID
and I keep getting:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
I was trying many different settings combinations. Now I have filled fields: App Domains,Site URL,Canvas URL,Secure Canvas URL,Page Tab URL,Secure Page Tab URL but still without success. Addresses are ending with / and are all the same.
Link are build proper by the sdk. I test building it "by hand" without encoding of redirect_uri param and redirect link build like that:
https://www.facebook.com/PAGE_USERNAME/app_YOUR_APP_ID
https://www.facebook.com/pages/Page_Title/PAGE_ID?sk=app_YOUR_APP_ID
Can someone tell me what i'm doing wrong?
The answer to that question is that facebook documentation is incorrect. Format of return_uri that worked is:
https://www.facebook.com/pages/null/PAGE_ID?sk=app_YOUR_APP_ID
The format of return_uri changed again, the new format is:
https://www.facebook.com/PAGE_NAME?sk=app_YOUR_APP_ID