I am trying to use FQL in order to get the number of comments of all posts on a Facebook page timeline.
I am executing :
https://graph.facebook.com/fql?q=SELECT%20like_info.like_count%20FROM%20stream%20WHERE%20source_id=%22130181453341%22&access_token=CAA...DED
However, this only displays the first posts of the timeline :
{
"data": [
{
"like_info": {
"like_count": 0
}
},
...
{
"like_info": {
"like_count": 16
}
}
]
}
The array stops at some point in the timeline. How to get the full timeline ?
Try adding a where clause that specifies after what date you want comments.
Related
i have a lookup activity in ADF which retrieves data from table like below
{
"count": 1,
"value": [
{
"Notebook_path": "/Users/Name#work.com/Project/ingestion/Cust1/ADT"
}
],
"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (um)",
"billingReference": {
"activityType": "PipelineActivity",
"billableDuration": [
{
"meterType": "AzureIR",
"duration": 0.016666666666666666,
"unit": "DIUHours"
}
]
},
"durationInQueue": {
"integrationRuntimeQueue": 0
}
}
now i want to use the Notebook_path from above results and pass it to a Notebook activity to run that particular notebook as in the output, from lookup activity.
since its in array its creating problems . would appreciate some help here .
tried a lot of things but dint help.
Thanks in Advance
I have a similar lookup output. The following is a reference image of the same.
You can use the following dynamic content to get the desired result.
#activity('Lookup1').output.value[0]['notebook_path']
My pipeline failed because I don't have a notebook, but you can see that the activity is trying to access the required path.
How can I GET the list of dependabot alerts available at https://github.com/{user}/{repo}/security/dependabot?page=1&q=is%3Aopen via the GitHub API?
I searched through the documentation but couldn't find anything there.
Thanks!
There is this RepositoryVulnerabilityAlert object available with the Graphql API.
For example for a specific repository, you can get all the alerts with the following query (check this out in the explorer) :
{
repository(name: "repo-name", owner: "repo-owner") {
vulnerabilityAlerts(first: 100) {
nodes {
createdAt
dismissedAt
securityVulnerability {
package {
name
}
advisory {
description
}
}
}
}
}
}
It also returns alerts that were dismissed which can be spotted using the dismissedAt field. But there doesn't seem to be a way to filter only "active" alerts
Sample output:
{
"data": {
"repository": {
"vulnerabilityAlerts": {
"nodes": [
{
"createdAt": "2018-03-05T19:13:26Z",
"dismissedAt": null,
"securityVulnerability": {
"package": {
"name": "moment"
},
"advisory": {
"description": "Affected versions of `moment` are vulnerable to a low severity regular expression denial of service when parsing dates as strings.\n\n\n## Recommendation\n\nUpdate to version 2.19.3 or later."
}
}
},
....
]
}
}
}
}
I am following the examples located on the following page:
http://developer.echonest.com/docs/v4/genre.html#artists
I'd like to offset the results from a search for artists by genre. The example they provide on the page listed "results" and "start". I assume "start" is the offset. The example query they provide is:
http://developer.echonest.com/api/v4/genre/artists?api_key=JEXNQ223JXCCQEINO&format=json&results=5&start=0&bucket=hotttnesss&name=jazz
But I get any error stating the "start" is an invalid parameter. Has anyone been able to use the "start" parameter with success?
This looks like a bug in their example. If you read the documentation, "start" and "results" are not valid for the genre/artists endpoint. Changing the example to remove these to parameters works.
Calling:
http://developer.echonest.com/api/v4/genre/artists?api_key=*********&format=json&bucket=hotttnesss&name=jazz
(replace the *** with your Key)
Yields:
{
"response":{
"status":{
"version":"4.2",
"code":0,
"message":"Success"
},
"artists":[
{
"name":"John Coltrane",
"hotttnesss":0.588225,
"id":"ARIOZCU1187FB3A3DC"
},
{
"name":"Thelonious Monk",
"hotttnesss":0.649332,
"id":"AR9PLH11187FB58A87"
},
{
"name":"Miles Davis",
"hotttnesss":0.697302,
"id":"AR7RTGF1187FB38793"
},
{
"name":"Miles Davis Quintet",
"hotttnesss":0.489603,
"id":"AR5DF1C1187FB4E94C"
},
{
"name":"Cannonball Adderley",
"hotttnesss":0.560071,
"id":"ARQ5TM41187FB3E97D"
},
{
"name":"Wayne Shorter",
"hotttnesss":0.548165,
"id":"ARO3CKW1187B9905A8"
},
{
"name":"Wynton Marsalis",
"hotttnesss":0.566708,
"id":"ARV3VEI1187B9AD5C9"
},
{
"name":"Sonny Rollins",
"hotttnesss":0.577764,
"id":"AR6Q4T91187B995616"
},
{
"name":"The Dave Brubeck Quartet",
"hotttnesss":0.570099,
"id":"ARLKR161187FB50694"
},
{
"name":"Kenny Burrell",
"hotttnesss":0.543388,
"id":"ARQYH461187FB3E975"
},
{
"name":"Stan Getz",
"hotttnesss":0.559735,
"id":"ARMGQLA1187B9AEBF8"
},
{
"name":"Dizzy Gillespie",
"hotttnesss":0.561122,
"id":"ARXA17J1187FB3B507"
},
{
"name":"Yusef Lateef",
"hotttnesss":0.513261,
"id":"ART95BW1187FB3AF79"
},
{
"name":"Bill Evans",
"hotttnesss":0.581819,
"id":"ARTLL9E1187FB4436F"
},
{
"name":"Freddie Hubbard",
"hotttnesss":0.524227,
"id":"ARU1K2U1187FB48529"
}
]
}
}
As far as I can tell, there isn't a way to page through the artists associated with a genre...
I have a MongoDB document structured like this:
{
"_id": ObjectId("50cf904a07ef604c8cc3d091"),
"lessons": {
"0": {
"lesson_name": "View and Edit Lists",
"release_time": ISODate("2012-12-17T00:00:00Z"),
"requires_anim": false,
"requires_qq": true
},
"1": {
"lesson_name": "Leave a Tip",
"release_time": ISODate("2012-12-18T00:00:00Z"),
"requires_anim": false,
"requires_qq": true
}
}
}
I have a number of such documents. I'd like to get all documents for which the release time of a lesson is greater than or equal to a given time. Here's the query I wrote:
db.lessons.find({"lessons.release_time":{"$gte": ISODate("2012-12-16")}});
But this is not returning any documents. Any ideas on what I'm doing wrong and how to correct it. Thanks.
Here's the result of my testing:
> db.testc.insert( { lessons: [
{release_time: ISODate("2012-12-17T00:00:00Z")},
{release_time: ISODate("2012-12-18T00:00:00Z")}
] } )
> db.testc.find({"lessons.release_time":{"$gte": ISODate("2012-12-16")}})
{ "_id" : ObjectId("50cfa093ab08a4592c73f927"),
"lessons" : [
{ "release_time" : ISODate("2012-12-17T00:00:00Z") },
{ "release_time" : ISODate("2012-12-18T00:00:00Z") }
] }
Your query is fine but, as others have pointed out, most likely your data is not structured as an array.
Hello I'm trying to taga friend in a wall post with officials graph api.
As reported on documentation
message_tags
Objects tagged in the message (Users, Pages, etc) (Requires access_token)
object containing fields whose names are the indexes to where objects are mentioned in the message field; each field in turn is an
array containing an object with id, name, offset, and length fields,
where length is the length, within the message field, of the object
mentioned
var array = {'data':{'id':XXXXXXXXXX, 'name':'Friend name','offset':0,'length':11}};
Facebook.code.WallPost({
"access_token" : Titanium.App.Properties.getString('access_token'),
"message" : $("#post_message").val(),
"message_tags" : array
});
Facebook.code.WallPost is a custom javascript function to post.
WallPost : function(data) {
$.ajax({
type : "POST",
dataType : "json",
url : "https://graph.facebook.com/me/feed",
data : data,
success : function(data) {
alert("posted");
},
error : function(data) {
alert("not posted");
}
});
}
With my code post has been published but without tag!
Someone can help me?
Thank you, Stefano
The story_tags field contains information about the people and pages tagged in the story, and is in exactly the same format as the existing message_tags field on the Post object. For example:
{
. . .
"story": "Dhiren Patel likes Marmot.",
"story_tags": {
"19": [
{
"id": 101961456910,
"name": "Marmot",
"offset": 19,
"length": 6
}
],
"0": [
{
"id": 1207059,
"name": "Dhiren Patel",
"offset": 0,
"length": 12
}
]
},
. . .
}
Each tag within the story_tags field is indexed by its offset to where the object is referenced within the story field.
More info: https://developers.facebook.com/blog/post/592/
its a readonly object. Try :
FB.api('/me/posts', { limit: 3 }, function(response) {
for (var i=0, l=response.length; i<l; i++) {
var post = response[i];
if (post.message) {
alert('Message: ' + post.message);
} else if (post.attachment && post.attachment.name) {
alert('Attachment: ' + post.attachment.name);
}
}
});
And set a breakpoint and read the response object, it contains the message_tags.
/J