how to show thumbnil image from youtube rss feed in iphone - iphone

I tried To Parse the response of the of the youtube RSS feed and displayed it in tableview...
I works fine except i can't fetch URL for the thumbnil image of the video from rss... It comes in description tag and inside description tag there is a whole div (html)... is there any simpler way example tutorial.....to fetch the thumbnil image from youtube rss...
Thanks

i have the same prob ,but have figured out with YOUtube API ,
make your feed url in this pattern
http://gdata.youtube.com/feeds/base/users/[INSERT USERNAME]/uploads
after in the generated xml there is a media:thumnail tag where u can used to display youtube thumnails images.
without using this format u will get a descr tag with div style image thumbnail quite hard to parse as it is a html part,
better try this,i have solved this using type of feed pattern

Related

Embedded Instagram Post doesn't show the image

I use the Embed-Button from Instagram and use the generated Embed-Code:
when I embed an Insta-Post on my website without image caption, it doesn't load the image.
But when I check the the inclusion for image caption it works fine: codepen.io/cheshirecat/pen/eYjrYZr
What I'am doing wrong?

How to get Facebook video thumbnail image from facebook video url in asp.net using c#

User uploaded videos thumbnail image not rendering with video_Id. e.x for below url I am not able to get a thumbnail image
https://graph.facebook.com/841765655909231/picture
https://www.facebook.com/AyuTheOnlyQueen/videos/%E6%B5%9C%E5%B4%8E%E3%81%82%E3%82%86%E3%81%BF-step-by-step-full-song/841765655909231/
"...For below url I am not able to get a thumbnail image"
https://www.facebook.com/AyuTheOnlyQueen/videos/%E6%B5%9C%E5%B4%8E%E3%81%82%E3%82%86%E3%81%BF-step-by-step-full-song/841765655909231/
You can try these steps:
1) Use HttpWebRequest to load the page's code (HTML) into some String variable.
2) Use String functions (like indexOf) to find the following within received HTML text...
Find first occurrence of <video and note that start position. Example integer is startPos.
From that new start position, now find the first occurrence of <img class=. Update the startPos.
Now from start Pos of <img class=, find position of first occurence of src=". Update the startPos.
Add +5 to startPos to skip 5 letters of src=". Now grab everything up to next occurrence of ".
That is the video's image URL.
URL from web page and resulting image below :
https://scontent-lhr3-1.xx.fbcdn.net/v/t15.5256-10/11114598_841767259242404_606288892_n.jpg?_nc_cat=106&_nc_oc=AQmoGDOf_G7khNZvfjXVDADkAqsBMJ6R89r4FgD_5i1xJvdFSsBQfc7M-mrW1bA_s-M&_nc_ht=scontent-lhr3-1.xx&oh=35d15b4527748ed7956c2276ab158eb4&oe=5DB1C235

ANDROID : Loading Image From link stored in mysql db in imageview?

I want to load image in card view with other data like title and desc.
I am uaing php to get result as json response which is working and also i am able to set data to textview and pass from one activity to other !
Only problem i am facing is in setting image in image view.
i can add image manually by making listview obj and storing link in ArrayList obj
Like obj.add(R.drawable.feature1.jpg)
How to do it dynamically from the json response i am getting ?
Sorry if i sound confusing as i am new to android and just want to make a image gallery where first i will display list of albums and after clicking one of albums all images from that albums are loaded and displayed.
{"products":[{"mid":"1","title":"Demo Video 1","link":"https:\/\/m.youtube.com\/watch?v=PCwjNfSM-U","mediaCreatedOn":"2015-08-30 18:59:18","mediaUpdatedOn":"0000-00-00 00:00:00"},{"mid":"2","title":"Demo Video 1","link":"https:\/\/www.youtube.com\/","mediaCreatedOn":"2015-08-30 18:59:18","mediaUpdatedOn":"0000-00-00 00:00:00"}],"success":1}
The above is the output from server side where only the youtube link is replaced by server img location.
Thank you for reading, have a nice day ahead :)
1:You can store image to database Example:mysite.com/img/34324234342.png (phpMysql)
2:And you can get image from php rest service (Only image link)
3:For load image from link , you can use picasso library (android)
4:If you want image with text, you can use custom listview
Example xml for restful service.
<myimage>
<title>abc</title>
<ipath>mysite.com/img/34324234342.png</ipath>
</myimage>

Facebook RSS Feed big image

Helle every one,
I'm currently working with a Facebook page RSS feed and I need to retrieve images on it.
the problem is that those images are just thumbnail. I would like to donwload the big one.
For exemple I have these feed : https://www.facebook.com/feeds/page.php?id=126044397444435&format=rss20
I have this image on the feed : https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/393656_257350694313804_126044397444435_712409_344887174_s.jpg
But I would like this one : https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/s320x320/393656_257350694313804_126044397444435_712409_344887174_n.jpg
How can I solve this problem ?
Thanks !
Look at the URLs
https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/393656_257350694313804_126044397444435_712409_344887174_s.jpg
https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/s320x320/393656_257350694313804_126044397444435_712409_344887174_n.jpg
The subdomain for the large image is fbcdn-sphotos-a instead of fbcdn-photos-a, it has a s320x320 directory name inserted before the filename, and the filename is suffixed with _n instead of _s
The 320x320 is a max size, the following url returns the image at 480 px height
https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/s480x480/393656_257350694313804_126044397444435_712409_344887174_n.jpg

Extract image URL from HTML text

In Objective-C what is the best method to extract an image url from HTML text?
I've got a chunk of HTML text which may contain one or more images. I want to be able to get the src URL of each image.
If you don't mind limiting yourself to iOS 4, you can use the new text checking APIs. The one you want is NSTextCheckingTypeLink and the NSRegularExpression class.
This seems to be answered over here: parsing HTML on the iPhone
The second answer down has a detailed explanation, however you will just have to change the xpath expression to match your image tags.