Add friends Facebook profile page to jQuery UI dialog - javascript

I getting a link to a friends profile page using the Facebook JavaScript API. I now am trying to add it to a iframe in a jQuery UI dialog. I have:
$('<iframe src="https://www.facebook.com/profile.php?id=505818552"><p></p></iframe>').dialog();
However this displays a Facebook logo with a 'go to facebook' link in the jQuery dialog. I tried using load(url) before dialog() but it didn't work because of cross-domains.
I was wondering if Facebook disables this kind of thing?
Is there a way of getting it to open in a jQuery dialog?

We do not allow this. Instead, please create a Facebook App and get the user 505818552 to authorize your App.
Then you will be able to pull that user's friends list by querying
https://graph.facebook.com/505818552/friends?access_token=USER_ACCESS_TOKEN

Yes, FB disables being included in an iframe as seen in this live demo.

Related

Make Google Bot detect AJAX contents

I'm developing a site (not mine) and I encountered a big trouble!
In this website I've got some modals that will open after a user clicks on a product, but I need to do so Google Bot detects these modals like pages. When a modal opens, a JS Function adds a # parameter to the URL like "#abc=modal_one".
I want that in Google Result appears this page as "www.test.com/page.php?#abc=modal_one". I've tried (and I'm trying) to render the page like Google Bot in Google Search Console, but GSC opens only the page and not the modal. I also added a ES6 (JS) code that just edits the page title when the modal is showing to the user (after user clicks to open the modal) but nothing, Google does not detect the page title set after the page is loaded.
If you can't understand something just tell me and I will try to explain my trouble newly.
Thanks in advance to all the StackOverflow community :)
Try exporting the various pages to a dynamic sitemap that Google can read.
View the Categorize parameters with the URL Parameters tool page for more information.

Link facebook share button to FB.ui()

I'm working with Facebook website integration and what to show a customized Facebook share dialog when clicking the Facebook delivered share button.
So i basically want a Facebook share button to call a JavaScript invocing the FB.ui() onclick instead of showing the stock dialog.
Is this possible?
Feed and share Dialogs
I think this question also have make by other before this.. check it Run Twitter and Facebook Share Button Code After ListCtrl Update

Shadowbox with links created via AJAX

I'm working on a page which already successfully uses Shadowbox.js. There's a search link at the top of the page which looks like this:
Search
This is located in the header.
In the body of the page I can search for a user and load their account information via AJAX. The plan is to add a button to their information table so a system admin can edit it. I'd like to use Shadowbox to bring up a confirmation page once the admin has submitted the edits. I'm using this link to try to do so:
Submit
However, when I click this link, it navigates directly to createPopup.php instead of loading it in a Shadowbox.
Am I supposed to be doing something with Shadowbox in JavaScript so that it plays nicely with links loaded via AJAX?

Open Graph Built-in Like vs. Like Social Plug-in for mobile web apps

I have a mobile app created using the javascript sdk, I would my user to be able to like posts, on the news feed. does anyone know how to achieve this?
There is nothing that prevents you from inserting multiple Like buttons on the same page.
Provided the first post leads to https://github.com/ and the second one to https://stackoverflow.com/ the Like buttons look like this:
<div class="fb-like" data-href="https://github.com/" data-width="450"></div>
<div class="fb-like" data-href="https://stackoverflow.com/" data-width="450"></div>
When the user clicks the like button, it appears on their Facebook page.
Note that the Likes should have links to pages that can be accessed by Facebook. Of course you can use your own pages.
More info: https://developers.facebook.com/docs/reference/plugins/like/

Facebook share with custom text on button

It used to be done this way:
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<a type="button_count" share_url="http://google.pl" name="fb_share">Share this page on Your's wall</a>
And it used to generate a share button with text "Share this page on Your's wall" instead normal "Share". Since last update it doesnt work anymore.
Is there any posibillity to change the text on share button?
With Facebook JS SDK:
You now have to use the Feed Dialog, which is part of the Facebook JavaScript SDK.
Without Facebook JS SDK:
If you don't want to be bothered with their SDK, you can use this simple link instead:
Share this page on your wall
Here's what it'll look like if you're sharing Google.com with this link:
https://www.facebook.com/dialog/feed?app_id=140586622674265&link=http%3A%2F%2Fgoogle.com&name=Google&redirect_uri=http%3A%2F%2Fs7.addthis.com%2Fstatic%2Fpostshare%2Fc00.html
Also, please acknowledge these three things:
You need to replace [[URL]] and [[TITLE]] with a link to the page you want to share and its title (both url-encoded).
The Feed Dialog has to show from which Facebook app the post comes from. The app_id parameter in the URL above is the one from AddThis. Create a Facebook app and put its own id in the URL to use the name you want instead of "AddThis Sharing". You can keep the app_id from AddThis though, it works just fine.
The last parameter (redirect_uri) is the page where the user will be redirected after sharing. It's currently a page from AddThis with some JavaScript that will close the tab / window. That way, the dialog just disappears when it's not needed anymore. You don't have to change it either, works great.

Categories

Resources