1

Facebook has a special javascript call for setting Fanpage permissions. Unfortunately, I can't get any javascript to work on my page.

Not even a simple alert('bla') in an onclick works. Am I missing something?

This is the call I want to make:

Facebook.showPermissionDialog("publish_stream", ondone, showProfileSelector, [000000]);
1
  • post some of your code maybe? Commented Jan 9, 2010 at 0:59

1 Answer 1

1

In your example, I think ondone should be "ondone". You have to refer to callbacks by name (as strings) if I recall correctly.

It has to do with FBJS being rewritten before it executes (all that pre-pending random strings/numbers/etc. stuff) and thus the ondone function no-longer existing as a callback.

Alternatively, try declaring the ondone function inline and see if that helps.

There could be more going on here (if literally no javascript works) but based on what's in your questions that'd be my first guess.

Sign up to request clarification or add additional context in comments.

2 Comments

You're absolutely right. I took the example code from the API documentation: wiki.developers.facebook.com/index.php/… There the permissions (like "publish_stream") had quotes, but the others didn't. So I thought it had to be omitted.
Yeah, don't trust the wiki examples. They're oftentimes outdated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.