sorry i don't know what is the purpose of the callback URL in most SSO context. Could someone please give me some tips, like why is the callback URL necessary, what it is used for, and what should i do in the callback URL. Thank you.
That's the page that the user is returned to after he logs in.
Example: You want to post a comment on a news page, but the website won't let you do it until you log in. After you log in, it returns you to the page so that you can post your comment.
Related
I'm using Facebook's share dialog with URL Redirection as shown here:
https://developers.facebook.com/docs/sharing/reference/share-dialog
Everything works fine, but the problem I'm having is that I need to get some kind of response or feedback in the redirect uri to know whether the user has published or cancelled the share.
I thought the post_id would be included as query string when redirecting. But this is not the case... I just get a trailing #_=_
So... is it possible to get somehow the response or some kind of feedback when redirecting to know whether the user has actually published the post or not?
Please also note that I cannot use the FB.ui API as the callback is
not working at all when using it inside a web mobile view.
Thanks!
In twitter it's possible by doing:
https://twitter.com/intent/tweet?text=THIS IS MY MESSAGE IT NEEDS ENCODING
Then it will bring up twitter with that message, and let you choose whether or not you want to tweet it.
I was wondering if there's a similar way with facebook posting a message through a link?
Thanks!
-Tim
Yes - and you don't need an app registered to do so! The only down side, is that you have to include a URL.
The query is simply:
https://www.facebook.com/sharer/sharer.php?u=<URL>&t=<text>
For example - https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fshkspr.mobi%2Fblog%2F&t=Check%20out%20this%20cool%20blog
Both the URL and the text will have to be URL encoded. As I said, it won't work without a URL.
Yes, you have the Feed Dialog that does the same. But of course you must have an app registered on http://developers.faceboof.com/apps.
URL Redirection:
https://www.facebook.com/dialog/feed?
app_id=145634995501895
&display=popup
&caption=An%20example%20caption
&link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fdialogs%2F
&redirect_uri=https://developers.facebook.com/tools/explorer
(replace app_id and redirect_uri with that of yours)
For the list of available parameters, check here
In facebook site you able to make a comment and attach image to it. Is it possible to do the same things with facebook api?
I have read this facebook for dev link and there is no answer to my question.
If you read the documentation properly, it says-
message is the only parameter in this API call. It should be a string containing the comment text.
So, using the API you can just comment a message to the object using-
POST /{object-id}/comments?
message='This is my message'
, no link/picture could be attached alongwith.
I don't know if it is a recent change in the way Facebook handles this, but if I put the complete url in the comment, Facebook detects it as an image and shows it there (along with the url).
Maybe it's not the cleanest way, but it's a way.
I am trying to use the direct link provided by facebook to post something on my wall. The post appears successfully on my wall. However, I can't seem to find a good way to give some feedback to the user on the successful action. I could create a webpage that says "Success" or something like that but I really wanted to show the post after I posting it.
In the facebook developers reference it says that after a successful post it puts a "post id" in the redirect link, but what should the redirect_uri be to use it?
http://www.facebook.com/dialog/feed?app_id=123050457758183&
link=http://developers.facebook.com/docs/reference/dialogs/&
picture=http://fbrell.com/f8.jpg&
name=Facebook%20Dialogs&
caption=Reference%20Documentation&
description=Using%20Dialogs%20to%20interact%20with%20users.&
redirect_uri=http://www.facebook.com
redirect_uri should point to your page where you will parse the post_id parameter out of URL arguments and do whatever you want, like redirect to the created post.
You may also want to use FB.ui({method:'feed'/*...*/}, callback) of JS-SDK to do all the work for you, so you'll be able to pick post_id in FB.ui callback instead of manually creating Feed Dialog URL and passing redirect_uri.
I am writing a website and want a user to be able to click post to Facebook and have it open a window already filled out with a custom post. I do not want to have to authenticate them with my site or anything like that just send them to a Facebook url with the post already filled in.
Twitter has something like this that I am using. For instance click this http://twitter.com/home?status=This%20is%20a%20custom%20post
Is there a way to do this same thing for Facebook? If so does anyone know the URL?
Thanks
I found the solution I was looking for. To post to a Facebook wall without actually managing tokens you must make a call to the url below with the parameters specified below.
"http://www.facebook.com/dialog/feed?app_id=YOU_APP_ID&link=A_LINK_HERE&picture=PATH_TO_A_PICTURE&name=SOME_NAME&caption=SOME_CAPTION&description=SOME_DESCRIPTION&message=MESSAGE_TO_POST_ON_WALL&redirect_uri=REDIRECT_URL_AFTER_POST"
This will redirect back to the url that was specified in redirect parameter after the post. It will have the parameter post_id with the id of the new post or no params if they did not post. You can find documentation here http://developers.facebook.com/docs/reference/dialogs/feed/.
The Like and Send buttons provide this functionality:
http://developers.facebook.com/docs/reference/plugins/like/
You include meta tags on your page and the Like / Send button pick this up for sharing to a user's wall.
You can't prefill story text, it's against FB policies. Twitter is cool with that, but on Facebook it's a no-no.
See: http://developers.facebook.com/docs/guides/policy/examples_and_explanations/stream_stories/
Scroll down a bit to 'Platform Policy IV.2'
You can put suggestions of what to say on the screen, but you can't prefill the comment box.