Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
25
rated 0 times [  27] [ 2]  / answers: 1 / hits: 15945  / 13 Years ago, fri, january 20, 2012, 12:00:00

I am trying to open a feed dialog using the JS SDK's FB.ui method and have it close after the user shares. My problem is the feed dialog is requiring a redirect_uri even though the documentation says it doesn't have to be defined, and the popup window redirects there and will not close like the callback function says.



Here's my code, attached to the submit click event:



    FB.ui (
{
method: 'feed',
name: 'xxx!',
link: 'link to FB tab',
picture: 'jpg',
caption: 'xxx',
actions: {name:'xxx',link:'url'},
ref: 'xxx',
redirect_uri: 'link to FB tab'
},
function(response) {
self.close();
}
);


If I leave off the redirect_uri, the popup opens but it just says the FB app has an error and please try again.


More From » facebook

 Answers
5

It appears this is a known change in Facebook's JavaScript SDK: http://developers.facebook.com/bugs/302946973066993



When using the Facebook JavaScript API, invoking FB.ui will fail unless a 'redirect_uri' property is supplied in the params object - this behavior is unexpected because:


1.) The documentation states that the 'redirect_uri' will be automatically appended by most SDKs [1] - previously the JavaScript SDK was providing one which closed the Lightbox iFrame. 2.) Adding a redirect_uri param results in the Facebook Lightbox iFrame redirecting which stops the user from being able to close it.
3.) The redirect_uri param was not required previously.



This is the behavior I'm used to and have been trying to duplicate. A FB dev reports that this is now "by design."


[#87881] Friday, January 20, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arielle

Total Points: 373
Total Questions: 105
Total Answers: 96

Location: Azerbaijan
Member since Fri, May 12, 2023
1 Year ago
;