Profile Picture and User Data in Single Graph API Request - facebook-graph-api-v2.0

I'm trying to write a single Graph API request that returns a large thumbnail of the user's profile picture, as well as their username/user ID.
I'm able to get the picture, name, and user ID with:
GET /v2.0/me?fields=id,name,picture
However, I can't figure out how to get a bigger version of the picture, like when I do this:
GET /v2.0/me/picture?type=large&redirect=false
I'm new to the Graph API and feel like I'm missing something really obvious, but I can't figure it out. My initial thought was this, but I think it's applying the type and redirect options to the me node:
GET /v2.0/me?fields=id,name,picture&type=large&redirect=false

Not entirely sure what your final goal is but would this help...?
Make the one call to simply retrieve the users ID and in your app you can then just use (by constructing the string) http://graph.facebook.com/[facebookId]/picture?type=large to access/view the large version of the profile picture.
Or
GET /me?fields=id,first_name,picture.type(square).width(200).height(200) where you decide what you want type, width and height to be.

Related

How to get photo data in data collection CUBA Platform

I have a data table in the frontend UI with first name and last name data and I need to add photos of these accounts. As I understand all the data should be in data collection, however, if you console log it, it doesn't show anything besides FN and LN. So, how do I get entity photo data and put it in the data collection?
It's hard to say without seeing your code, but it looks like you haven't included the image attribute into the view. You can find a great guide on working with images in CUBA here.

How can I save or get data about places near me without breaking policies

This is more of a general programming question.
I'm trying to create an app, think of it as a Yelp clone. I have most of it working but I'm missing one important feature. The data of the places around me. For now I'm only focused on food, so I'd like it if I search something like "Pizza", it'd show me all the pizza joints near me.
I was originally planning to use Google Places API. However if you havent heard, they're changing their pricing and lowering the free tier and upping the cost by a huge margin.
There's also the problem of saving the data. One workaround I saw a user suggest was to just keep using Google's API, but every time you make the query, store the data in your own DB as well (I only need address and name and latitude and longitude) so eventually, you'd have what you need in a sense. However I also want to have something like a simple rating system for each place like Yelp, but Google (and all other places like MapBox, Here Maps, etc) states something along the lines of "info from their API should not be stored or cached for more than 24hrs" but it's very broad and not specific.
So what I was planning to do was, call the Google API, grab the 3 info I need (Address, Name, Lat/Lng), add more fields to store the rating, likes, whatever else the user will add. Then store it in my database, but that doesn't seem like a solution now.
So does anyone have any ideas or advice? Or know of a service where I can get the details of all the food places? And if possible, can anyone confirm that storing the Name, Address, Lat&Lng is a violation of their policy since in my eyes, it's public data, but something like the rating that Google provides, or the pictures that Google provides, now that's Google property.
For obtaining places you can use OpenStreetMap, e.g. using Overpass API. Since larger traffic can be expected you should run your own database(s) instead of using the public APIs.
However OSM doesn't contain ratings. So you have to combine this data with some other publicly available rating system.

how to create version one burned down chart using java REST client api

I am trying to get the data to create the burned down chart from version one.
I came to know there is no standard api's for that.
Here i found that by making multiple call's to fetch todo value for a scope of timebox it is possible.
Is there any better way to do it?
and also let me know any good open source libraries(javascrpt/java) to plot such graph
i tried the way shown here but i am not able to make out what value i am getting.
i tried a get request like
"base URL"/rest-1.v1/Data/Timebox?where=State.Code='ACTV'&asof"11-25-2015"&sel=Name,EndDate,State,Workitems.ToDo.#Sum
but could only get present value but not the past ones.
Thanks in advance
You are using the rest-1.v1/Data endpoint. From this endpoint you will get the current state of assets in your VersionOne instance however, there is an attribute "Prior" which contains the previous state of a VersionOne asset (Timebox). The most robust way to access historical data is though the rest-1.v1/Hist endpoint. You can find details about Hist queries here.
Using your query
"base URL"/rest-1.v1/Hist/Timebox?where=State.Code='ACTV'&asof"2015-11-25T17:30:00.00"&sel=Name,EndDate,State,Workitems.ToDo.#Sum
The asof keyword will return the state of that Timebox at that instance in time. Observe the proper format of the date.

How to get public data from Google plus

I have a project that involves having public data downloaded from Google plus, can you give me a reference on how I can download like 1 GB of any type of public data from Google plus?
The data can be posts or circles information. I've tried to work with developer tools but the far I got is downloading my own profile information but what I need is public data.
Thanks !
There is no truly "public" data on Google+.
Every stream is unique to a user.
Try viewing the site without logging in, and you'll see what I mean.
Since users have the ability to block other users from viewing even their "public" posts, before Google shows you a post they check to see if you're on the blocked list. For them to be able to do that, you have to be logged in.
Your best bet would be to create a dummy account and only look at your nearby stream or What's Hot.
Otherwise you'd need to circle users, and that would create the stream. G+ is not like twitter. There's no firehose to speak of.
To programmatically cull data, you would have to use their API, but even then their HTTP API limits you to 20 results per search and you have to provide a query.
You could get up to 100 results per user if you picked individuals and got their userids, but again there's not a programmatic way to get a bulk dump.
You could randomly select users by using an activity search for a dictionary entry, and then seed that into the activity listing api... something like (in pure pseudocode)
for Random word in dictionary
group = userids from GET https://www.googleapis.com/plus/v1/activities?query=[word]
for userid in group
GET https://www.googleapis.com/plus/v1/people/[userid]/activities/collection/public
Actual code would of course depend on the language.

DISQUS: Is it possible to get a particular user's posts in a given forum?

I am running a website, whose community is powered by Disqus. I would like to create user profile pages, where the page would display the particular user's most recent activity, but only for my particular site (forum, in Disqus' terminology).
I ran through the entire API documentation, but I could not find a way that would allow me to filter by both user, and forum. I would be able to grab either the entire list of posts for a given forum, or the one from a particular user.
In every API call, there is a mysterious query paramater, where I tried to plug a series of filters, but none of them worked.
Is there something that I could be missing?
It's not that obvious, but you can use the query param as a filter for users. Try something like this:
https://disqus.com/api/3.0/forums/listPosts.json?forum={SHORTNAME}&query=user:{USERNAME}&api_key={YOUR_API_KEY}