Posted 29 January 2013 - 03:15 PM
Hi I'm using ajax to load pages on my site but I am also using the Facebook like button short code
I need to reload the JS associated with this short code as the Facebook like button disappears when the page is loaded with JS. Could anyone assist me on the location of the file containing the JS? I have the reload code all figured out but I just need the file location.
Any assistance would be much appreciated.
Here's my homepage
Link to a post where it will display normally on first load
If you click through to a couple of posts you will notice the like button no longer shows up, it seems to display the first load of a page but if you keep clicking through posts it stops.
The button should be displayed to the left of the following text beneath the post content 'Click like to get the latest music news, hottest tracks and more via Facebook.'
Posted 29 January 2013 - 06:41 PM
What are you using to display the Facebook button? A plugin?
Posted 29 January 2013 - 09:50 PM
I see the problem, which isn't a problem at all.
If someone has already liked your page, then the FB button greys out. If they have not liked it yet, it's blue. As someone who's liked the page already, it appears grey to you. If you unlike it, the button will be blue again. Meanwhile your visitors who are seeing the page for the first time will see it blue.
It's actually working as it should, as Facebook doesn't allow multiple 'likes' from any one person.
Posted 29 January 2013 - 10:15 PM
Thanks for the reply but I know that's supposed to happen, which it does. However the button disappears completely due to ajax stripping the JS away, I have had to reload a couple of other plugis due to ajax doing to same thing and I just need to find the file where the shortcode draws its JS from so I can reload that file with the page load.
If you click through more than 1 post you will see the Facebook button disappear completely greyed out or not.
Posted 29 January 2013 - 10:17 PM Best Answer
Well, the js is inline, if you look at that area of the page you can see it. Maybe the facebook code is designed like that to stop automated bots from mass liking pages.Just a thought, maybe a question for the facebook dev forums?
Posted 12 February 2013 - 11:43 AM
Thanks for the assistance. I’ve had to use the facebook iframe method of implementing a like button instead of using the pagelines shortcode.