right now we are getting 84*84 profile picture, but we need original twitter profile picture into http n https. Please lemme know how to get dat?
You'll find the URL to the user's profile image in the profile_image_url_https field in the User object.
Note that, in the next version of the Twitter API (Twitter Developer Labs), the field is simply called profile_image_url and it will always return an https URL value. Do not use the legacy profile_image_url if you are using the v1.1 API.
Once you have the URL, you can add or modify the end of the path to request different sizes. Twitter supports a number of different values: normal, bigger, mini, and original. By default, you'll get back the "normal" variant which is probably 48x48px.
For example, my profile image is currently returned as
https://pbs.twimg.com/profile_images/1230679874039427074/sMPPa2tz_normal.jpg
You can request "bigger" by changing the URL to include _bigger instead of _normal, or you can ask for the original size by dropping _normal completely. In the case of the example above, that currently returns a 400x400px image.
Related
I have an iOS app, with a long list of items to be POSTed to a remote web server. The list can be long enough to exceed recommended lengths for a GET request. After the list is posted, the user can log into their account and manipulate the list.
Ideally, I'd like to POST the list to Safari (or another default browser) so that if the user already has logged in, they don't need to do so again and they have access to all the normal web browser functionality.
It seems to work with a UIWebView, but isn't the best interface.
This can be done on Android or the UIWebView using this: https://stackoverflow.com/a/9909613
Do it in two steps:
POST the data to the server "anonymously". The server would assign some kind of unique id, and store the received data somewhere (database, temp file...), associated with the ID. Send back the ID to the client.
Alternatively, the ID might be provided by the client directly. For that, make sure it's some kind of UUID/GUID so you don't have conflicts.
Open a second URL (either in Safari or, probably better, in an SFSafariViewController) pointing to the login process along with the ID from step 1.
The server can then use the ID to locate the data posted during the first step.
I've been trying to figure this out for quite some time now. I am trying to Display most recently uploaded video from a specific user. First I tried doing It with most_recent (https://gdata.youtube.com/feeds/api/standardfeeds/GB/most_recent) etc.., but I soon realized that It is only able to get most recent video from a specific country, not user specific like I want. So the question is, what IS The url to get to user specific latest upload? All the google's pages about their API didn't mention a word about it(or I'm blind)
Pages I've read:
https://developers.google.com/youtube/2.0/reference?csw=1
https://developers.google.com/youtube/2.0/developers_guide_protocol#Standard_feeds
Getting most recent youtube video links for a user using API
https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds
I suggest to use Data API v3 instead of GData since it's the supported API. Support and new features will only come to Data API v3.
The way to do in v3 is, you first do a channels->list with part=contentDetails and mine=true to get authorized user's channel or id=USERS_CHANNEL_ID or forUsername = USERS_USERNAME
like GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&mine=true&key={YOUR_API_KEY}
in the response you get uploads playlist id and put it into playlistItems->list call in "id" parameter
GET https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&id={ID}&key={YOUR_API_KEY}
Uploads playlist is in order, so first result is the most recent upload. If you just want that result, in the call you can set maxResults=1
If you want to use api version 2 instead of 3: Here is the documentation link:
https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds#User_Uploaded_Videos
The url to use is:
https://gdata.youtube.com/feeds/api/users/userId/uploads
;Where you replace userId, with the id of the specific user.
Use: https://gdata.youtube.com/feeds/api/users/userId/uploads?max-results=1 , if only 1 result is needed.
Apologies, I can only include 2 URLs as a new user so I have had to econonomize.
I am having a problem where the user object in Facebook's Graph API is not returning a profile image correctly. I can only find one case of this problem. For all other uses I have tested it appears to be working correctly. The profile image doesn't seem to have any privacy settings, since I'm able to view it normally from the profile page.
I am using Facebook's Graph API to load the profile image for a user/page by putting this URL into an IMG tag:
https://graph.facebook.com/[profile-id]/picture?type=square
This has worked in all cases I found during testing, including pages and users. For one of our users deploying the app on a page, however, the URL is loading the question mark image, as though there is no profile image for the page. Their page clearly has a profile image, as you can see here:
http://www.facebook.com/EgansRestaurantPub
But if you click through to the Egan's Calendar tab, you'll see the question mark image. The image URL is the following, which returns the question mark:
https://graph.facebook.com/400488613342471/picture?type=square
I've checked the ID using the following link format, to ensure it's the right ID for the page:
http://www.facebook.com/pages/[anything]/400488613342471
My first theory was that there were privacy settings on the profile image, but my personal account (as a non-fan of the page) is able to view the profile image. My only other idea is that perhaps it is because the page uses a short URL (EgansRestaurantPub) that doesn't include the page ID. For similar pages, I found using the following worked:
[graphurl]/cocacola/picture
[graphurl]/BMW/picture
But when using the same method for my client's page, it still returns a question mark.
Does anyone know why this is not returning the profile image for this page? This is the only page where I have found this problem.
I am using the PHP SDK and a bit of the JS SDK. I would prefer to avoid making another call to the API that would delay loading the page. That's why I liked being able to throw the URL straight into the IMG tag. But I will make another call if there is no other way.
It seems there is some kind of restriction as mentioned in the user document (picture field):
access_token required for pages with whitelisting/targeting
restrictions, otherwise no access_token required
You just need to supply a user access_token for this to work:
https://graph.facebook.com/400488613342471/picture?type=square&access_token=XXX
To test this, you can directly get an access_token from the Access Token Tool.
I have situation where i got two sides working separatly
Webpage using OAuth to register/login user (and display his account data)
Chrome extension where user authentificates himself through OAuth (no my webpage involved yet)
So i can't figure out is how to connect extension to see user webpage data. See image below to understand better.
What are possible ways to get it work?
UPDATE:
One idea is:
give every user secret key in their webpage account
And after they authorized in extension request for this secret key
on success, get data through my own written API
it could work, yes? maybe some improvents you can give or totaly different idea?
I added to my iOS application option to detect and response to custom URL schemes to launch application ( http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html ).
Link is working perfectly on different sites (using href), but I'm having problem with Facebook. If I'm trying to post link (using Graph API) which looks like:
myapp://blabla
Facebook return error:
The url you supplied is invalid
And for feed with link return
link URL is not properly formatted.
I can't just post url as a message because it's not being detected as a URL and appear like text only.
Is there any way to post to Facebook wall with custom links?
Edit:
I have an idea, but I don't know if it gonna work. Putting
myapp://blabla directly into address field in mobile browser is launching application so probably accessing an webpage (like http://www.mywebpage/myapp) with only redirection to
myapp://blabla gonna work too, but is Facebook gonna accept that link?
I think your suggestion in the edit is the correct method, and should work. However applications like spotify seem to use an intersticial page which fires the "app link" with javascript, the advantage to this approach is that you can use that page to "sell" the app to users who don't have it and also provide lovely open graph tags for people who want to share it.