Multi-Friend-Invite on my website? - fbml

I have a website and users who have registered on my site by using FBConnect to login.
As they're authenticated with my app I have access to their profile from PHP and from JS.
I'm trying to render the multi-friend-invite with FBML and nothing is happening.
I'm trying to build a "refer your friends" page and render a multi-friend-invite widget on our webpage.
Can someone give me some advice? The FBML i'm using is not being modified in the DOM at all.
I've tried a direct FB.XFBML.parse() call on the surrounding <div> and it's still doing nothing.
Help?

Related

HTML/Javascript login page using CasperJS

I've been trying to login to write a script using CasperJS that logs in to my work's router login page, and I'm a little lost...
The html for the login page is here: https://dl.dropboxusercontent.com/u/30314127/help.rtf
Thanks in advance,
Ronka
I'm not sure anybody is going to write the code you need. Casperjs has pretty good documentation. You need to request the page, find the id's of the login and sendKeys. I haven't run into any issues of not being able to log into a web based application using casper. IF you're completely at a loss I have a video you can watch which enters data into an Ajax application, which shouldn't be too much different than what you're trying to do.
Filling out Ajax forms

How to make the Wordpress admin-bar work with AJAX loading

I'm working on a website that uses html5's push- and popstate in combination with ajax-calls to create a website that dynamically loads in Wordpress posts and pages, without causing a page refresh.
I've got that working fine, but I would love it if the black Wordpress toolbar/adminbar that shows at the top of the site when you're logged in as an admin, also reflected the change of content. Is there any way at all to make this happen? So that when I go from a post to page, for example, the "edit" link in the admin bar updates.
I don't think it's as easy as I hope it is, and if it can't be worked out I think I'll just disable the adminbar on the front-end. But it could be that I'm missing something.
Thanks in advance!
I'm working on this myself. I'm gonna build an ajax action and jquery function to do this. I will post here when it's done. For NOW i've instructed my users to just refresh to get the edit link. if you're using HTML5 history then you're on the permalink you want anyways. refresh and let the server regenerate the bar. not perfect but not terrible.
another option is to put edit post links in your template.

Embed iframe cross domain

I need to have an iframe script which I can give to my different clients, so that they can embed it in their sites. Just like Youtube or facebook does.
But it does not get rendered due to cross domain restrictions.
I have gone through every documentation for x - frame options , crossDomain ajax call.
The problem with crossDomain ajax call is that I have only JSONP to work with.
I have tried this - just go to any youtube video and get its Embed code. Its a plain iframe script e.g. <iframe width="420" height="315" src="http://www.youtube.com/embed/7N5OhNplEd4" frameborder="0" allowfullscreen></iframe>
If you inject the above script in your html, it will get rendered , but as soon as you edit the src of the iframe to youtube.com itself , it will go blank.
Facebook's iframe too gets rendered everywhere smoothly.
I am hell tortured by this thing.
Please guide me on this. Thanks in advance!
IF you look at the response headers from youtube.com it is returning "X-Frame-Options:SAMEORIGIN" so they are adding the header on the server to stop people from displaying youtube (website pages) via a iframe.

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).

How does a website load only part of the page and still display full on URLs?

I am looking at the Gawker blogs (http://io9.com, http://lifehacker.com/) and I'm curious about how they are made.
When I click for on a link only the article part of the page reloads displaying a loading icon while it does.
But what I can't figure out is that links point to new URLs like io9.com/something/something and its not something like I see on ajax pages that they put a site.com/#something tag at the end of the url from javascript to mark the page after an ajax request.
Can I change the full blown URL from javascript or what is happening?
When it happens, the website is using the HTML5 History API. This API can change the url (via JavaScript) without changing the page.
See caniuse.com for browser support.
If you would like to implement it in yout website, backbonejs.org would be very useful.

Resources