When you embed a "like this page" button on your page, your profile picture and other people's profile pictures are shown. This requires no authentication, because it's all done through an iframe.
I want to place a placeholder on my site, but I want to spice it up, by adding their profile picture from Facebook instead. Obviously it would have to be in an iframe, because I don't want people to accept terms and stuff like that.
Is this doable? All I have seen requires their user id and so on, which I won't be able to get, as I technically don't handle any of their requests (it's all done client-side because of an iframe). Thanks.
Related
My team is developing a widget/sdk so people can embeed our code in their sites and display some useful things.
My question is:
once these owners embeed our code, is there a way for us to target certain content in their website?
We want to, for example, if the content in such sites include a hashtag with a word (say #stackoverflow), when the final user hovers that hashtag display an extra iframe on top of it, like a tooltip in the top of the word.
Is this doable?
We thought about creating a chrome extension so any the final user can have that functionality, but we're also wondering if that is doable when the 3rd party site embeeds our code too.
Thanks!
edit: just to clarify, the owner of the site has to embeed a .js file in their site to display our iframe.
We are implementing a facebook share dialog so users can share images from their accounts. Those images are hosted on S3 and we use expiring links to ensure that normally user images are only accessible to them.
The question is, if we provide that link to the facebook js library to create the share dialog, when the user posts, does facebook make a copy (where our link expiring 2min later is fine) or does that link have to remain available for longer or forever? If it does make a copy, is that when the user clicks the Post button? Or earlier when the preview is show in the dialog?
Following this link,
Share articles, photos, videos and other content as a URL that points
to the page where your content lives.
It seems facebook don't copy over image, it just keeps a reference.
I want to make a browser plugin that works as follows:
The user enables the plugin. He then has a thumbs up and a thumbs down appear on the screen somewhere. If he clicks thumbs up, it means he likes the current web page he is viewing. If he clicks thumbs down, it means he doesn't — similar to how you vote on YouTube videos
The responses will be collected from many users to a website I setup
The plugin will allow people to see how many people voted a thumbs up and thumbs down for the current page they are viewing
Does anyone know how I am supposed to collect, aggregate, and return the values of the responses? Also, I would need to be able to know the ID of each user because I want to be able to perform future operations based on a user's past behavior. Can I avoid planting a cookie, in case they delete them, and have an ID that is stored in the extension's local files?
I'm sorry if this wasn't clear or if I should unpack it a bit more. I'm familiar with Wordpress, so a solution with that would be great.
From your requirements what i understand is For uniquely identifying a user, you can assign a Unique ID to a user who installs your Extension. For details look this answer https://stackoverflow.com/a/23854032/6428485
You can use content script to add Thumbs Up, and Thumbs Down icons in website. When user clicks thumbs up/down you can use background script of extension to send vote, UserID, and website URL through POST Request to your server to store.
You can collect votes from any user by above method and store it on your server.
Next time when any user visits that URL you can make a GET Request to your server and get number of likes and dislikes against that URL and display them on website using content script.
Hope this helps. Let me know if you need any clarification.
We are building an educational tool whereby students opens a website in another tab/window and then searches around the other site. Once finding the information they enter the url of the page they were on into a box. Its a bit clunky and what we want to do is allow them to open the new site (bbc.co.uk for example) within an iframe that has a header at the top allowing htem to return to their workbook.
When they navigate around the BBC site, we would like for them to be able to click a button on our frame which grabs what url they are on and some other info like page header etc and insert that automatically into their workbook.
However I cant seem to find how to grab the url of the page being viewed within the iframe. As we send them to bbc, I can get the source id easily enough but as soon as they start moving around the bbc site doing their research there is no way for the parent iframe (on our domain) to see what page they are on?
I know this is not possible in JS due to XSS issues, but was wondering if there is a workaround. Or any other way to grab the url. Currently our way of doing things is clunky, we want to make the tool a lot more easier.
Thanks
Paul
I am planning to create some dynamic content in a Facebook tab for my fan page. It should have content displayed if the visitor is not a fan, and then upon them clicking the Like button, changing the content to display hidden carrots (metaphorically). Is it possible to capture the event of the click on the Like button from inside the iframe?
On a Facebook fan page, when the user clicks the Like button, the whole page gets reloaded and Facebook sends an HTTP post to your website with a parameter called signed_request that you would need to decode and look at with server code, not javascript. The code to decode it will obviously vary depending on what language you are using, but the process is documented on Facebooks site. Once decoded, you will need to look at the page.liked value.