1

I tried manipulating fb_button_text value using jQuery but, it didn't work at all. Then I tried alerting the val, but it returned undefined. Any idea on how to manipulate it?

alert($(".fb_button_text").val()); //returns undefined
siaooo
  • 1,779
  • 3
  • 22
  • 24

3 Answers3

2

Not possible. Same Origin Policy forbids you from interacting with iframe content coming from another domain.

CBroe
  • 86,812
  • 12
  • 88
  • 140
0

You can not manipulate the text on those buttons because then malicious developers could mis-lead their users into clicking on a button that performs a different action from the one it is labeled with.

I'm sure you can see the problem here. A button labeled "Exit" could be in fact a "like" button. This is not a good idea.

Lix
  • 46,307
  • 10
  • 97
  • 126
0

As the other users wrote, you can't manipulate the text value's of this buttons,
but an another solution is to build your custom image, text or button to use with the JS SDK.

function fbAuth() {
    FB.login(function(response) {
      if (response.authResponse) {
        alert('User fully authorize the app.');
      } else {
        alert('User canceled login or did not fully authorize the app.');
      }
    }, { scope: 'friend_likes' });
}

I have already answer this, here:
Facebook SDK: Replace "Log In" button with custom image

Community
  • 1
  • 1
Philip
  • 4,941
  • 2
  • 29
  • 36