I need to link the user's twitter and facebook profiles in a website profile while the website is loaded inside other websites' through iframe.
Is it possible to do that using a modal div inside that iframe? I'm quite in trouble thinking about the return url and page reload.
Have some example?
btw i'm using php but think it's not important now
Thanks,
A.
You can do what ever you want in your page even when it resides in an iframe. What you can do in it (visually) is only limited by the dimensions of the iframe (unless the hosting page has some kind of layer on top of your iframe).
I can't speak of the twitter way of doing things (you can always check their documentation) but with facebook it's pretty easy to integrate into the graph using the api.
You need to have a facebook app, and then in your page (even if it's in an iframe) you can use the javascript sdk to authenticate the user and then use the graph as you need (and have permissions to).
Related
I have a web app at www.mydomain.com/webapp and its set up with Google Analytics. I create a facebook app at apps.facebook.com/webapp and iframe in the above url.
Is there a way to distinguish activity of users on facebook from users on mydomain?
Thanks for any help and direction you can give me.
You could use JavaScript to determine that your page is displayed in an iframe – but that would also be true if maybe other sites embedded your page.
A better way would be to check for the [signed_request][1] parameter that gets POSTed to your app on initial load into the iframe. (If you were paranoid about someone “faking” that, you could also verify the signed_request.)
Once you figured out that your page was actually loaded inside Facebook, it should be easy to execute the appropriate JS code to send that info to Analytics.
I am trying to create a system which allows customers to add a Facebook page as an add-on to what our business offers. Ideally I want users to click a button from our site which creates a page for them on Facebook which contains an iFrame in which content is served by us from our site.
I've never done any work with Facebook before, I don't really understand how the whole app thing works (I don't really use it personally as well) and I'm not sure what the best way to achieve what we seek. I have read a few tutorials on the fb developer site, which were all completely out of date, but I created an app of type 'App on Facebook' that displays a canvas url with an iframe which displays some content.
However, what I really want is to do one of the following:
1) Create an app that can be added to someone's page, which takes a custom url and displays this url in the iframe on the canvas page.
For example, a user called bob initialises the facebook integration from our site, we automatically create a page for them, add the app we have created, and provide a url like http://ourcustomurl.com/bob which is a link to some content from our site which is then displayed in the iframe.
2) Another option I thought would be possible would be creating a new app for every user who enables the facebook integration from our site, and just setting the canvas url on creation. But this option doesn't sit well with me, we don't really want to create an app for people, but a page.
You can't create a Facebook Page or an App via the API
If i understand correctly you want page admins to install your app into a tab on their page, and have different content displayed on that page tab depending on which page it is.
Check this document: https://developers.facebook.com/docs/appsonfacebook/pagetabs/
The main takeaway you should have is that you can use the signed_request which is sent to your app to determine which Facebook Page the App is being loaded from and decide on your side which content to display based on that
I am developing facebook application.I want to add iframe to my facebook page.I don't have any idea ,how to do it.I know we can not create a page using graph api or any api in facebook.
All the information you need is here - found by a quick google search:
http://developers.facebook.com/docs/reference/fbml/iframe/
You'll need your own hosting server which have HTTPS, and create your page with the language that they support and place the link points directly to the folder to facebook app setting. make sure your width does not go beyonds 520px for facebook custom tab page. if apps u can go up to 760px.
Hope that helps
I want to give ability to users to add the application in their fan pages directly from the canvas application.
Earlier there was a method (fb:add-to-profile) for adding application in user's profile tab, but now its no longer supported by facebook.
So, I am looking for similar kind of things for fan pages, either by using FBML or programmatically.
There are new Graph API methods that let you programatically add tabs to pages.
See the 'tabs' connections here:
http://developers.facebook.com/docs/reference/api/page/
I am in the process of converting my FBML application to iframe as per Facebook's new requirements:
No new FBML applications We will stop allowing new FBML applications, but will continue to support existing FBML tabs and applications. Instead, we recommend using IFrames.
--Facebook Roadmap http://developers.facebook.com/roadmap
Now my application allows you to post your creation to another users wall (or a fan/group page). My old application used the FBML fb:friend-selector to allow the user to pick a friend, and it would grab the id of them, and post on their wall using FBJS Facebook.streamPublish.
My question is, how do i go about doing the same thing in an iFrame? As far as i am aware, the only option i have is:
Use FBML in the iframe and have the js SDK turn it into an ugly, hard to access iframe (which also defies the point of sticking it all in a iframe in the 1st place, as it is going to be removed at somepoint?)
Create my own friend selector using graph api or something. Have yet to see a working example of that in action, makes me wonder if it is possible.
Are there any other options out there, or does anyone have a working custom friend selector in an iFrame?
Thanks in advance :)
You can accomplish this with XFBML in the iFrame (the same way you would handle this on an off-canvas FB Connect application). Here's a post with more details.