GET friends/list Twitter - objective-c

I'm working on a project for school and im pretty much done. Anyways project is to make a list of friends in a view controller, just user image and username, then clicking on their user image would bring up another nib with the same user picture only larger and username. We have to use GET friends/list and this is my call https://api.twitter.com/1.1/friends/list.json?cursor=-1&skip_status=true&include_user_entities=false&count=20
and im using this to get the profile image
NSString *imageUrl = [[usersArray objectAtIndex:i] objectForKey:#"profile_image_url"];
The only problem is that these pics are so tiny, and blurry. Making them larger just makes them more blurry, example from twitter api webpage:
http://a0.twimg.com/profile_images/2838630046/4b82e286a659fae310012520f4f756bb_normal.png
I know this would work, but its only for each individual profile.
http://api.twitter.com/1/users/profile_image?screen_name=USERNAME&size=bigger
Is there a way to use the GET friends/list call and get bigger more clear pictures?

Try replacing the "_normal.png" in the image url with with "_bigger.png" for 73px by 73px
http://a0.twimg.com/profile_images/2838630046/4b82e286a659fae310012520f4f756bb_bigger.png
or you can get the original image by stripping "_normal" from the url.
http://a0.twimg.com/profile_images/2838630046/4b82e286a659fae310012520f4f756bb.png.
Twitter documentation can be found at: https://dev.twitter.com/docs/user-profile-images-and-banners

Related

Google Custom Search API Search Image by Image URL

I am working on an application which will have an option for users to upload images. Once uploaded, the application will show other images from the web which look exactly similar, whether or not of the same size.
For this, I will create a temporary URL for the image so that I could provide Google custom search API the URL of the image. I would expect in response, URL's of images that are exactly the same or similar to it, perhaps in JSON format.
I did find a similar question posted in January. Till then Google did not support anything like this, apparently:
Google Javascript Custom Search API: Search images by image url
One can also simply do:
http://images.google.com/searchbyimage?site=search&image_url={Image URL}
Since that is not part of an official API, it may not be right to use this method.
Can someone help me?
Well, the answer quite simply is TinEye Commercial API https://api.tineye.com/welcome. I was looking in the wrong place I guess, I did not have any luck with Google Custom Search API.
Would you need a simple result?
If you are, you can use Vision API of Google.
This is very simple.
https://cloud.google.com/vision/
You can try on the top.
First, access the URL.
Second, upload your image file on the "Try API"
Third, click "JSON" tab menu on the result.
You can be seen JSON about similar images.

Show a single thumbnail when posting on facebook

A little background info is that my team and I developed a website for a Real Estate Agency and I've been assigned the task of setting the image of the currently selected property into facebook's sharing feature.
The webpage for the property is dynamic as there are several listings, so what I've done is select the first image that is loaded on the page and set it to the og:image meta tag.
Now let's say I copy the URL and post it on Facebook, it'll show the correct thumbnail, HOWEVER, it'll also show multiple thumbnails from other listings.
All images on the website are over 200 x 200px and are within an aspect ratio of 3:1.
My question is, how do I tell Facebook to only take my initial image and not grab others while it's as it.
Is there perhaps a SelectSingleImage property that I can apply?
I've already spent more time searching for the answer to this issue than I would have liked, so thanks for any help provided, it's much appreciated.
One method I use sometimes is to recognize Facebook's server and simply provide it with different data. This way you can actually only have one image on the page (as far as Facebook knows).
I don't know anything about vb.net, but here is a simple code sample in PHP. All it does is perform a regular expression on the user agent of the request to match it against the string "facebook".
$isFacebook = false;
if(preg_match("/facebook/",strtolower($_SERVER["HTTP_USER_AGENT"]))) {
$isFacebook = true;
}
Facebook may very well change their user agent signature one day, but for now, I'm pretty sure you'll be safe but keep synced with the Developers Blog and the Roadmap.
It seems that Facebook saved those images in cache for some bizarre reason, but to resolve this issue all I had to do was enter the URL into Facebook's Linter tool which in turn cleared the cache on their server.

Has anyone been able to use web images with the Tiles and Badges App sample?

I've been trying to get my app's tile to display an image from the web, but couldn't get it to work. I then tried the Tiles and Badges app sample, where in scenario 3 you can send a tile notification that uses a web image. No matter which image url I paste in the text box, the tile refuses to get updated. So apparently, the sample isn't working either, or something is very wrong.
The images are all smaller than 1024x1024 and less than 200KB. Fun fact: if I download one of the images I unsuccesfully tried to feed the sample, add it to the project and then send a notification using it as a local image, the tile gets updated. So apparently the image isn't the problem.
Has anybody been able to get this working? I don't get what I'm doing wrong.
Do have internet permission ticket in app manifest? Maybe only your app dont have permission to download your image from web.

Graph API - Photo uploaded by API is not visible

I`m geting the following problem.
Using graph api I can create an album (exactly photo album of my app). There is no problem also to upload photo to already created album (I have aid of this album as result of previous operation). After uploading photo I get also pid of the photo.
The problem starts now at the moment when I would like to get photos of the album. Graph API returns an empty array. Also I don't see any new album when I go to app page. However if I go to wall of my app page, I see this photo on "last added photos" list. I can enlarge uploaded photo, and I even see info that it's located in the proper album. There is another wird thing. If I choose this album, Facebook notice me that it`s an empty album.
I doesn't mean those operations are not done well, because if I request for a particular photo using pid (which I know from upload photo operation) I get a proper result - photo exist. Unfortunately it's really uncomfortable to store all pids of album in data base and perform separated request to each of it.
If the Facebook App is in "sandbox" mode, the images will only be visible to the admin/developers/tester users. Public users will not see the images.
Turning sandbox mode off fixed this issue for me.

No icon when sharing with Sharekit

I am trying to do a really basic sharing on Facebook from my app, with ShareKit. Most things looks ok, but I don't understand why there's no icon to the left, just the small one in the footer. I can't find a way to put it there. How do I customize it? For me it looks like the left picture I attach, but I would like to have it like the right.
NSURL *url = [NSURL URLWithString:#"http://itunes.apple.com/us/app/...?mt=8"];
item = [SHKItem URL:url title:[NSString stringWithFormat:#"I'm playing someGame on my iPhone! My Highscore is %i, think you can beat it?", 456]];
[SHKFacebook shareItem:item];
You cannot out of the box. This dialog is provided by the Facebook SDK, which is just built into ShareKit's files - unchanged.
I am sure if you do a bit of digging around in ShareKit's folders you'll find the Facebook SDK, but I am not sure if you're allowed to edit its appearance (I know you aren't allowed to change the Share button for example)
With regards to the icon - this is loaded from the web and cannot be changed. The dialog comes from the Facebook website directly and somehow intercepting it and putting it on your own website would create an invalid request.
Edit: Based on your lovely edit (love the spray annotations :P), you can achieve this in the settings page for your app in Facebook. To do this, head over to Facebook's developer app (should be in the applications section of your Facebook account) and upload a large resolution icon for your app. Remember, it asks for a small 16x16 icon and the same one in different sizes, if it finds no icon with the sufficient size it'll display nothing.