How to get FB Like to display message - windows

I have added the FB Like button to a web page using the process described here. The button renders OK, however I expected it to render the Be the first of your friends to like this page message, however it does not. I have played around with the different layout styles, send button and show faces options, and even different browsers (IE8, FF, Chrome) however nothing seems to work. If I want that message to display on the page when the page has not been liked yet, what do I need to do? Is the message something that is only displayed with the iFrame version of the FB API? Thanks in advance!

I must have mis-copied the generated tag the first time around, because I was able to get the message to render after I re-copied it. Also wanted to mention that you have to be logged into FB in order to get the Be the first of your friends to like this page message. If you are not logged in, then a different message will be rendered instead.

Related

Laravel 5.2 Popup User Notifications in Browser - Examples, Tips?

I have a guitar lessons site where I want to notify users (guests or logged in) about new notifications in real or near real time. I followed this example:
https://blog.pusher.com/writing-realtime-apps-with-laravel-5-and-pusher
I have an event set up, I have pusher account, I have things working as described in the above link.
But... I would like to have the notifications show up the way notifications appear on a lot of other sites. Namely, where a small popup appears on bottom right corner of browser regardless of where user is scrolled on current page. Or maybe where a message bar would appear on top of browser regaardless of where user is scrolled. In any case, I can't find examples of 5.2 notifications in this manner. All I see are examples of using a message div in a blade file and having the div populated via the pusher code in the blade. So I imagine to do do what I want is similar in spirit, just requiring some extra front end steps that are not clear to me yet.
Tips, examples appreciated!
Thanks
Well you can use a common laravel blade file (with pusher code) and inherit that file in all blade templates.
Now using jquery growl (http://ksylvest.github.io/jquery-growl/) or alert box of your choice you can show the popups on any page you want.

Facebook like button's iframe not expanded after ajax request

I'm adding a facebook share button to each post on a Wordpress (Using Facebook Share Button New plugin), it works ok for each post/page except when i'm loading them trough ajax, the result it's a normal Facebook like button but the popup (to write a comment) appears inside the button it is not expanded.
To check go to: http://iwanttobeher.com/ and then click on any face at the bottom of the page, then test the like button and you'll see what happens.
I don't know what to do, i tried to FB.XFBML.parse() after loading the content but the result is the same.
Switching to HTML5 didn't help in our case. What did was to remove the FB object just prior to new content being inserted into the page via Ajax:
delete FB;
wrapper.html(response.data);
We reload full pages via Ajax and so new page content recreates the FB object and re-initializes XFBML anyway. Not sure if this workaround would work if we reloaded only parts of the page though.
The original answer is here.
I've managed to fix it by changing the implementation to HTML5 instead Iframe or XFBML using Facebook's tool to generate like buttons: https://developers.facebook.com/docs/reference/plugins/like/

how does facebook opens short popups for photos and other short messages and remains on same page

While using facebook, when we click on some links, a small box appears in front of us initially showing LOADING and then loads the content e.g. photos, show more etc.
Are they using AJAX to do so!
Please help me in this.
Thanx in advance...!
You might get the same effect using AJAX.
Also look here: http://choosedaily.com/1178/15-jquery-popup-modal-dialog-plugins-tutorials/

Back button to ajax results, advice request

I am trying solve the back button issue within my app. The scenario is:
I have a home page with a search form which sends and receives data with $.ajax(), then the results loaded through ajax, their links points to a controller that won't be done by GET in ajax so that means that the page will be refreshed (so the home page with the results looks like this: http://url/en/home and a result link may look like this http://url/fetch/data/x123av).
The problem is which is the best way fix that when click back button to return the results from the search box?
I have found some answers in stackoverflow related to my question:
http://code.google.com/p/reallysimplehistory
http://tkyk.github.com/jquery-history-plugin
But from the documentation of those plugins, they all work by checking the hash change which I don't have.
Hope I have explained well enough, and I do have searched stackoverflow and google for a solution but I didn't find one that is close to this or either I've jumped over it...
Please just point me to the right way :D
But from the documentation of those plugins, they all work by checking
the hash change which I don't have.
If you want to handle the back button with AJAX request you will have to redesign your application so that it works with hashes as that's the only way. Changing the fragment portion of an url doesn't trigger a page reload but it is added to the history, so when you press the back button you are able to detect this change without navigating away from the page.
As mentioned by SLaks in the comments section another possibility is to use the HTML5 history API but obviously this assumes that the client browser supports it.

fb:comments and iframe apps

I've got a FB fan page with an application tab. Application canvas type is Iframe, not FBML. What I want is the ability for a user to comment on the info I put in that tab (simple fb comments form that you can add in your app or website). Now, <fb:comments> works for "Like" action, but fails to post any coments. The form itself is visible, but when you click "post", nothing happens.
I define xid, returnurl, showform, canpost params", tried various samples, and it still doesn't work - no error is shown, but no action whatsoever. I'd put the social plugin in there but FB strips off the scripts or iframes even if they're from the same (facebook) domain. If it helps, here's the sample code I've used:
<fb:comments xid="veryuniqueid_123" canpost="true" candelete="true" numposts="5" showform="1" publish_feed="0" simple="1" reverse="1"></fb:comments>
Any ideas anyone?
Thanks,
d.
Solved
Loaded JS SDK from https://developers.facebook.com/docs/reference/javascript/ , then added the code provided by facebook in https://developers.facebook.com/docs/reference/plugins/comments/ , "XFBML" version (since iframe isn't supported and HTML5 is a bit too early).

Resources