Dmcloud Api : How to Get thumbnails of the Video Uploaded on Dmcloud with java Api? - thumbnails

I am Using Dmcloud java Api for uploading video on dmcloud.but theres's api doesnt give much information about how to get the thumbnail of the particular video.
i can get the stream url download url and evrything.so if any one can give me proper guidance for this..

To get thumbnail url of a particular video, use the get_assets method in cloudkey object.
Ex :
String thumbnail_url = cloud.mediaGetAssets(media_id, assets_name);
Where assets_name is an array of needed asset like :
'jpeg_thumbnail_small',
'jpeg_thumbnail_medium',
'jpeg_thumbnail_large',
'jpeg_thumbnail_source'
If it doesn't work, thinks that i'm using PHP API, and my working method is :
return $this->cloudkey->media->get_assets(array('id'=>$idMedia,'assets_names'=>array('jpeg_thumbnail_large')));

Related

Can you retrieve facebook photos in Unity?

Is there anyway to retrieve photos that are not the profile picture on Unity through the facebook api? or any other way?
1. Easiest
Use www class to fetch the image texture.
string link = https://graph.facebook.com/v2.1/" + friendID + "/picture?width=50&height=50&redirect=true;
WWW pic = new WWW (link);
yield return pic;
if (pic.error == null)
{
go.renderer.material.mainTexture = pic.texture;
}
where friendID is your facebook id. Here you can pass the id for any of your friends.
width and height to specify what dimension do you want the image to be.
2. A bit complex but useful in long run
link to pass to www class
string link = https://graph.facebook.com/v2.1/" + friendID + "/picture?width=50&height=50&redirect=false;
the difference in this method is that you are now not redirecting to the cdn permanent link.
this will give you a json file. Now you can parse the json file to get the actual link.
use this link again with www class to get the actual image
benefits of using this method.
You can save the image once and next time just ping for permanent link only.. if they match then don't fetch image again.
You're in luck. Facebook themselves have made a tutorial for Unity, which is a small game using Facebook's profile pictures. Here is a link to it.
Yes you can. Not sure what platform are you using.
You can use Facebook official SDK from here
https://developers.facebook.com/docs/unity
Authorise your platform, facebook will give you a token.
Then you can call graph API to get whatever you need.
For Example:
https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me%3Ffields%3Did%2Cname%2Cphotos&version=v2.2&

when used /me/feed post, it seems that the facebook is using cached link url

I have made an web site using facebook api.
such as below
var params = {
method : "stream.publish",
message : $("#textareaForSns").val(),
picture : urlForGameIcon,
name : titleForSns,
description : descriptionForSns,
link : "http://hgurl.me/a5t"
};
FB.api("/me/feed", "post", params ...
but, I found a problem. :(
I used link url as http://hgurl.me/a5t. this url is operating to redirect to another web site according to device type. (mobile or pc)
I changed redirection url later but it doesn't redirect to new url in each post. it occasionally redirect to old url yet
old one is 183.110.213.149:10080/ds/install.php.
new one is drgfriends.hangame.com
I don't know exactly how the facebook is working internally. I think that facebook is using cache data.
how can I make this short url working to redirect to new url I changed?
can I remove the cache?
please help me sir
thank you

facebook post a youtube video to stream.publish

I'm using the facebook SDK for iOS, but I assume that doesn't matter as every facebook platform has the post option for stream.publish
I can send a regular post just fine, but when I post a YouTube video it shows up as a link rather than a YouTube video. Is there a different option other than stream.publish I should use to accomplish posting a video?
I tried video.upload and video.publish, but neither worked. What should I do? Thanks.
I'm more familiar with the C# SDK but it shouldn't be that different.
Are you specifying the post type as a link?
Ex.
args["message"] = msg_txt;
args["title"] = title;
args["type"] = "link";
args["link"] = "http://www.youtube.com/watch?v=blahblah";
args["source"] = "http://www.youtube.com/v/" + YouTubeVideoID + "?version=3&rel=0";
Can you provide a code snippet of what you are doing?

cannot get image info using https://graph.facebook.com/<photo_id>

The API always return false, without any detailed information.
Then same even when using the photo IDs of my own photos.
However, the photo ID listed in the API document (the Coca Cola one) works without problems...
Your call to FB is correct i.e.
https://graph.facebook.com/PHOTO_ID + accesstoken
will return a JSON response with info about your image and urls to download the image in different sizes.
Most likely reason for your problem is you haven't requested the "user_photos" permission from the app user.

facebook api in blackberry

Hello friends I am using blackberry facebook sdk but that is not working properly. When I use
their skd that is going right but when I create other file and call api them I have face the problem. Please help me. thanks.
I was face same problem when i was tried to use one feature of local image posting on friends wall,but i resolved it using :
Download graph api from http://sourceforge.net/projects/facebook-bb-sdk/. After that i added two thinks.
one was when i wont to post a photo to your friends wall ,you had to put one more key-value in the JSONObject(Request) - that was requestObject.put("target_id",getid()) in publisePhoto method facebookuser.java & facebook.java
Second was, i had to change JSONObject responseObject = fb.write(getId() + "/photos", requestObject, pPhoto.getMIMEType(), imageData, true);
to
JSONObject responseObject = fb.write(getId() + "/photos?access_token="+Facebook.token, requestObject, pPhoto.getMIMEType(), imageData, true);in FacebookUser.java & Facebook.java
where token is Static string from Facebook.java and store the value of access_token (you have to add it)
I hope that will be helpful to you(Little bit).