Embed soundcloud player with url - php

i'm actually working on a website where the users will put the soundcloud link of their tracks and there will be a player directly on the website. The problem is I have not found any solution on how to embed a soundcloud player with only the link. I can't ask my users to give me the iframe link it would not be serious i guess.
So thanks to everyone in advance !

I can't ask my users to give me the iframe link. You can change an iframe src with javascript. Just give the iframe an id. Then compose the link using js and insert the user's part into the string to be assigned to src.

Related

Create a video preview from link paste

Is there a script that simulates facebook's video post? where you can paste the link in your post, and it will automatically bring up a preview and description of the video? Or is this simple enough to do without a script? How would I go about this?
When you paste the link you will need to parse the link to retrieve the video ID.
Once you have the ID you can get the video information from the Facebook Graph.
This should give you an example of the data available: https://developers.facebook.com/tools/explorer/?method=GET&path=me%3Ffields%3Dvideos

Create a link that facebook recognise

I have a question and i don't know how to explain.
If i post an audio file on soundcloud (e.g.) the site is giving me a link. Facebook recognizes the link and is showing me a play button, and i can listen directly on the page, without having to go to the soundcloud. Also, is on soundcloud i upload an image, facebook will show my image.
Can someone explain how can i do that ?
I have a server and from time to time i want to post some audio file (link from my server) to facebook. I want facebook to recognize my links, so everyone who is accessing my page to be able to listen the audio file.
Thanks a lot for your answer.
You need something called Open Graphs Tags. This is meta data which lives in header of your page.

Script for checking if a video on page exist and display it?

I'm trying to detect if a page has a video. If it does then display it on the page. I've seen this done with sites like youtube but I need something to pull in more sites like vimeo, blog video sites like tumblr and so on.
Is there a script that just searches for video on a page?
Any help is much appreciated or at least point me in the right direction.
You could do a find on the body using a video embed selector.
(Using JQuery)
$('body').find('embed').css('display','block');

Facebook photo gallery widget for my website?

Is there a widget to get all albums and photos from a facebook page and display them in a simple grid on my website?
Preferably, the widget would use PHP, JavaScript, or a combination.
I have a client who wants to display all the pictures found on their facebook business page on their website. I could manually download and upload each picture from facebook to his website, but I figured this would be a good place to use Facebook's api.
Here is a simple widget. Created it in about 3 hours so its not perfect but it works.
There is no CSS styling either so you can easily style it up.
https://github.com/zechdc/Facebook-Photo-Gallery-Widget
I'm assuming that you want the page to display images that are currently on the page, so when the photos are updated on the business page the website is also updated?
If so see this below tutorial:
http://www.codeofaninja.com/2011/06/display-facebook-photos-to-your-website.html
Looking at the reference to their Graph API it doesn't look to hard, all you need is a photo album id and you can get the photo album as a JSON object:
https://graph.facebook.com/99394368305 (Coca-Cola's wall photos)
You can try SlideshowFx plugin (http://www.oopstouch.com) proposed for Joomla and WordPress.
Initially based on Picasa, they port the plugin to Flickr and Facebook.
A lot of option available.
Check demo here: http://www.oopstouch.com
Regards,
Joël
I use this super duper quick solution. Just replace "{FACEBOOK-PAGE-ID-HERE}" with your facebook page id.
<iframe src="http://facebookgalleria.com/gallery.php?id={FACEBOOK-PAGE-ID-HERE}" scrolling="no" marginheight="0" frameborder="0" width="551" style="height: 769px;"></iframe>

Post a link on Facebook wall og:image does not works

i just want to copy and paste my website links on users facebook walls , when share from http://www.tvguide.dk/nyheder/2011-10-15/TV2_satser:_Nu_med_spritnye_v%C3%A6rter_!/ share buttons it works and picks a correct og:image thumbnail ,
however when i copy paste the link on the wall the facebook picks the logo image. insted of og:image value
can you guys help me please
You won't be able to change that, unless you always upload a picture when you post on someones wall! The og:image is only used for the open graph which is used from like and share buttons, comments etc, but not in facebook itself.
Read up on internationalization: http://developers.facebook.com/docs/internationalization/
Your website is in Danish but you have used set locale as en_US. Also the title, type and URL properties are not being interpreted correctly by Facebook. http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tvguide.dk%2Fnyheder%2F2011-10-15%2FTV2_satser%3A_Nu_med_spritnye_v%25C3%25A6rter_%21%2F
Make changes and check the progress at URL Debugger(Linter) given above. If everything fails try including the FBJS SDK and use fb:share-button. I had a similar problem once with WordPress which got solved using the JS SDK

Categories