How to set review for revision using Gerrit REST API - rest

I'm trying to setup Teamcity building and verifying patchsets from Gerrit. The last step should set Verified to -1 if build failed. I'm playing around with Gerrit REST API and I think I found a proper command:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review
The documentation says:
As response a ReviewInfo entity is returned that describes the applied
labels.
My request looks like this:
POST <gerrit-url>/a/changes/I696f00f4968fcb35fa614ce6325499aa15367150/revisions/current/review
{
"message": "Build failed",
"labels": {
"Verified": -1
}
}
As a response I get full revision info:
{
"id": "dev_test~master~<change-id>",
"project": "dev_test",
"branch": "master",
"hashtags": [],
"change_id": "<change-id>",
"subject": "a test",
"status": "NEW",
"created": "2017-04-03 07:53:19.000000000",
"updated": "2017-04-04 08:47:34.000000000",
"submit_type": "MERGE_IF_NECESSARY",
"mergeable": true,
"insertions": 133,
"deletions": 7,
"unresolved_comment_count": 0,
"_number": 381,
"owner": {
"_account_id": 4,
"name": "<my-name>",
"email": "<my-email>",
"username": "<my-username>",
},
"labels": {
"Code-Review": {
"all": [
{
"value": 1,
"date": "2017-04-04 08:47:34.000000000",
"permitted_voting_range": {
"min": -2,
"max": 2
},
"_account_id": 4,
"name": "<my-name>",
"email": "<my-email>",
"username": "<my-username>"
}
],
"values": {
"-2": "This shall not be merged",
"-1": "I would prefer this is not merged as is",
" 0": "No score",
"+1": "Looks good to me, but someone else must approve",
"+2": "Looks good to me, approved"
},
"default_value": 0
},
"Verified": {
"all": [
{
"value": 0,
"permitted_voting_range": {
"min": -1,
"max": 1
},
"_account_id": 4,
"name": "<my-name>",
"email": "<my-email>",
"username": "<my-username>"
}
],
"values": {
"-1": "Fails",
" 0": "No score",
"+1": "Verified"
},
"default_value": 0
}
},
"permitted_labels": {},
"removable_reviewers": [],
"reviewers": {
"REVIEWER": [
{
"_account_id": 4,
"name": "<my-name>",
"email": "<my-email>",
"username": "<my-username>"
}
]
},
"current_revision": "913330441711b067899a664a60c78be518e547b4",
"revisions": {
"913330441711b067899a664a60c78be518e547b4": {
"kind": "REWORK",
"_number": 6,
"created": "2017-04-03 14:08:14.000000000",
"uploader": {
"_account_id": 4,
"name": "<my-name>",
"email": "<my-email>",
"username": "<my-username>"
},
"ref": "refs/changes/81/381/6",
"fetch": {
"ssh": {
"url": "ssh://<url>",
"ref": "refs/changes/81/381/6"
},
"http": {
"url": "http://<url>",
"ref": "refs/changes/81/381/6"
}
}
}
}
}
It's not affected by request. Same response is returned when I send request using GET method or using POST method with invalid JSON in body(!)
Gerrit version is: 2.13.6-3008-gcdc381e
Do I something wrong?
PS. Here is similar question, but it isn't helpful: Gerrit set-review api doesn't work
EDIT:
It seems that I getting response from GET request not POST

I figured it out. It's not gerrit problem. I used http request and our server redirected to https with 301 which the Postman fallowed and returned response for GET request.

Related

How to exclude some item when query with typeorm in Nestjs and Postgres

I want to build a query when i send username to server so i can exclude the record has the excludeUsers has the same username i sent.
Here is my data : `
"id": "f4830220-9912-4cbb-b685-edf4aaaf8fd5",
"createdAt": "2022-03-24T10:19:48.096Z",
"updatedAt": "2022-03-24T10:26:42.487Z",
"isDeleted": false,
"username": "vietphuongthoa98",
"link": "",
"type": "follow",
"current": 13456,
"target": 13556,
"totalPurchase": 100,
"purchasedPacks": [
{
"id": "fbb3079b-32c9-4c4b-a297-16741d1f5485",
"name": "Some packets",
"type": "follow",
"count": 2,
"price": 100,
"follows": 50,
"createdAt": "2022-03-23T07:18:22.898Z",
"isDeleted": false,
"updatedAt": "2022-03-23T09:49:30.192Z",
"description": "Some packages description.",
"originPrice": 0
}
],
"excludeUsers": [
{
"id": "9d8c25d2-8f03-46b3-92fa-b9489b943a56",
"deviceName": "iPhone 12 Pro Max",
"username": "hoaa.hanassii",
"platform": "ios",
"timeZone": 0,
"deviceAge": 21,
"subscribed": true,
"coins": 19600,
"subscriptionExpiration": "2022-04-27T00:00:00.000Z",
"isBlocked": false
}
]
Here is my query builder :
queryBuilder
.leftJoin('featured_user.excludeUsers', 'excludeUsers')
.andWhere('excludeUsers.username != :username', {
username: filter.username,
});
The actual query result is :
SELECT "featured_user"."id" AS "featured_user_id",
"featured_user"."tenant_id" AS "featured_user_tenant_id",
"featured_user"."created_at" AS "featured_user_created_at",
"featured_user"."updated_at" AS "featured_user_updated_at",
"featured_user"."is_deleted" AS "featured_user_is_deleted",
"featured_user"."username" AS "featured_user_username",
"featured_user"."link" AS "featured_user_link",
"featured_user"."type" AS "featured_user_type",
"featured_user"."current" AS "featured_user_current",
"featured_user"."target" AS "featured_user_target",
"featured_user"."total_purchase" AS "featured_user_total_purchase",
"featured_user"."purchased_packs" AS "featured_user_purchased_packs",
"featured_user"."user_id" AS "featured_user_user_id",
"excludeUsers"."username" AS "excludeUsers_username",
"excludeUsers"."id" AS "excludeUsers_id"
FROM "featured_users" "featured_user"
LEFT JOIN "featured_users_exclude_users_users" "featured_user_excludeUsers" ON "featured_user_excludeUsers"."featured_users_id"="featured_user"."id"
LEFT JOIN "users" "excludeUsers" ON "excludeUsers"."id"="featured_user_excludeUsers"."users_id"
WHERE "excludeUsers"."username" != $1 -- PARAMETERS: ["hoaa.hanassii"]
The problem is nothing response. Any ideal ? Thanks
can you add getMany() end of querybuilder and try
queryBuilder
.leftJoin('featured_user.excludeUsers', 'excludeUsers')
.andWhere('excludeUsers.username != :username', {
username: filter.username,
}).getMany()

Unable to retrieve the changeCounts properties for a git Pull Request in AzureDevOps using the REST api

I am trying to find (roughly) the number of lines of code that has been changed in a Pull Request using the Azure DevOps REST Api. The documentation suggests that it is possible but I have been unable to get it to work.
The api's return a GitCommitRef[] as a response and inside the GitCommitRef there is a changeCounts property, but this mostly appears to be missing from most responses.
Things I have tried\observed:
1. List of commits for a pull request
I can get a list of the commits for a pull request, but this does not include the changeCounts
Request
https://{{coreServer}}/{{organization}}/{{project}}/_apis/git/repositories/{{repositoryId}}/pullRequests/{{pullRequestId}}/commits?api-version=6.0
Response
{
"count": 3,
"value": [
{
"commitId": "0b415...669fda",
"author": {
"name": "name",
"email": "name#email.com",
"date": "2021-11-02T03:34:23Z"
},
"committer": {
"name": "name",
"email": "name#email.com",
"date": "2021-11-02T03:34:23Z"
},
"comment": "checkin commit",
"url": "https://dev.azure.com/{{organization}}/{{project}}/_apis/git/repositories/5f32ff...2a97ac1/commits/0b415...669fda"
},
2. Getting a list of commits for a repository does return the changeCounts
So I thought, okay I will just retrieve each commit and get the counts that way, but I cannot get it to honour the searchCriteria, so if I ask for a specific commit I still get all the commits on the repo
https://{{coreServer}}/{{organization}}/{{project}}/_apis/git/repositories/{{repositoryId}}/commits?searchCriteria.compareVersion.version=67...4b4&searchCriteria.compareVersion.versionType=commit&api-version=6.0
Response
{
"count": 100,
"value": [
{
"commitId": "71...a93a",
"author": {
"name": "name",
"email": "name#email.com",
"date": "2021-11-07T23:59:52Z"
},
"committer": {
"name": "name",
"email": "name#email.com",
"date": "2021-11-07T23:59:52Z"
},
"comment": "Merged PR 11087: did some work",
"commentTruncated": true,
"changeCounts": {
"Add": 0,
"Edit": 1,
"Delete": 0
},
3. Specifying the commit id does not return the changeCounts either
If I specify the commit id when retrieving a commit that, only returns the commit but not the changeCounts
https://{{coreServer}}/{{organization}}/{{project}}/_apis/git/repositories/{{repositoryId}}/commits?searchCriteria.ids=0b...fda&api-version=6.0
Response
{
"count": 1,
"value": [
{
"commitId": "0b...da",
"author": {
"name": "name",
"email": "name#email.com",
"date": "2021-11-02T03:34:23Z"
},
"committer": {
"name": "name",
"email": "name#email.com",
"date": "2021-11-02T03:34:23Z"
},
"comment": "did some work",
"url": "https://dev.azure.com/{{organization}}/{{project}}/_apis/git/repositories/5f...ac1/commits/0b...da"
}
]
}
Anyone have an idea why the api's do not seem to be working for me?

MS Graph API- End-point to read email messages with header information from outlook account

I am using the below endpoint to read mail messages from a given mail folders but I see the message does not contain header information.
end point- https://graph.microsoft.com/v1.0/me/mailFolders/{folderid}messages/?$orderby=sentDateTime
Response looks like-
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('55f7b855-44a8-46c2-908a-00ff4d54c46e')/mailFolders('AQMkAGYyOTI1Yzc5LTFlZjctNDlhYy1hMWQzLTA1MjY0ZmRkADBkZTAALgAAA--el_XftXZKt0YdPN_913sBAFL-3e9Uo9BKmUKAmISlmIAAAAIBCQAAAA%3D%3D')/messages",
"value": [
{
"#odata.etag": "W/\"CQAAABYAAABS/93vVKPQSplCgJiEpZiAAAAMRZRE\"",
"id": "AAMkAGYyOTI1Yzc5LTFlZjctNDlhYy1hMWQzLTA1MjY0ZmRkMGRlMABGAAAAAAD-3pfl37V2SrdGHTzfvdd7BwBS-93vVKPQSplCgJiEpZiAAAAAAAEJAABS-93vVKPQSplCgJiEpZiAAAAMTZWmAAA=",
"createdDateTime": "2021-08-02T12:47:39Z",
"lastModifiedDateTime": "2021-08-02T12:47:42Z",
"changeKey": "CQAAABYAAABS/93vVKPQSplCgJiEpZiAAAAMRZRE",
"categories": [],
"receivedDateTime": "2021-08-02T12:47:40Z",
"sentDateTime": "2021-08-02T12:47:39Z",
"hasAttachments": false,
"internetMessageId": "<MAZPR01MB5442E2218F9D377BD1D514E4E9EF9#MAZPR01MB5442.INDPRD01.PROD.OUTLOOK.COM>",
"subject": "rr",
"bodyPreview": "rr",
"importance": "normal",
"parentFolderId": "AQMkAGYyOTI1Yzc5LTFlZjctNDlhYy1hMWQzLTA1MjY0ZmRkADBkZTAALgAAA--el_XftXZKt0YdPN_913sBAFL-3e9Uo9BKmUKAmISlmIAAAAIBCQAAAA==",
"conversationId": "AAQkAGYyOTI1Yzc5LTFlZjctNDlhYy1hMWQzLTA1MjY0ZmRkMGRlMAAQAKmsc6svyzlHuJr_l4TQwX4=",
"conversationIndex": "AQHXh5yTqaxzqy/LOUe4mv6XhNDBfg==",
"isDeliveryReceiptRequested": false,
"isReadReceiptRequested": false,
"isRead": true,
"isDraft": false,
"webLink": "https://outlook.office365.com/owa/?ItemID=AAMkAGYyOTI1Yzc5LTFlZjctNDlhYy1hMWQzLTA1MjY0ZmRkMGRlMABGAAAAAAD%2F3pfl37V2SrdGHTzfvdd7BwBS%2F93vVKPQSplCgJiEpZiAAAAAAAEJAABS%2F93vVKPQSplCgJiEpZiAAAAMTZWmAAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
"inferenceClassification": "focused",
"body": {
"contentType": "html",
"content": "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><meta content=\"text/html; charset=iso-8859-1\"><style type=\"text/css\" style=\"display:none\"><!--p{margin-top:0;margin-bottom:0}--></style></head><body dir=\"ltr\"><div style=\"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)\">rr<br></div></body></html>"
},
"sender": {
"emailAddress": {
"name": "some name",
"address": "some address"
}
},
"from": {
"emailAddress": {
"name": "some name",
"address": "some address"
}
},
"toRecipients": [
{
"emailAddress": {
"name": "some name",
"address": "some address"
}
}
],
"ccRecipients": [],
"bccRecipients": [],
"replyTo": [],
"flag": {
"flagStatus": "notFlagged"
}
}
]
}
Earlier we used java.mail API to do the same and used to get it like
javax.mail.Message message= ;
Enumeration headers = message.getAllHeaders();
Is there any way to achieve this using an MS graph API?
If you want the Internet Message headers then you need to include that in the Select Parameter as the Graph doesn't return it as a default property eg
https://graph.microsoft.com/v1.0/me/messages/?$select=internetMessageHeaders

HTTP requests are tampered by other HTTP requests, with golang and standard library

cat main.go:
```
package main
import (
"encoding/json"
"log"
"net"
"net/http"
"net/http/fcgi"
"os"
)
func main() {
//setup the config
configFile := "config.json"
fd, err := os.Open(configFile)
if err != nil {
log.Fatalf("Can't open config file: %v", configFile)
}
CFG := config{}
err = json.NewDecoder(fd).Decode(&CFG)
if err != nil {
log.Fatalf("parse config error: %v", err)
}
//init DB connection
db.InitConnectionInfo(CFG.Database.Host, CFG.Database.Port, CFG.Database.Database, CFG.Database.Username, CFG.Database.Password)
//register HTTP handler
sessionHandler := &handlers.SessionHandler{}
http.Handle("/sessions", sessionHandler)
http.Handle("/sessions/", sessionHandler)
userHandler := &handlers.UserHandler{
Facebook: &oa.OAuth{AppId: CFG.Facebook.Key, Secret: CFG.Facebook.Secret},
Sina: &oa.OAuth{AppId: CFG.Sina.Key, Secret: CFG.Sina.Secret},
Google: &oa.OAuth{AppId: CFG.Google.Key, Secret: CFG.Google.Secret},
Tencent: &oa.OAuth{AppId: CFG.Tencent.Key, Secret: CFG.Tencent.Secret},
Mixpanel: &hu.Share{Token: CFG.Mixpanel.Token},
FacebookShare: &hu.Share{Token: CFG.Facebook.Token},
SinaShare: &hu.Share{Token: CFG.Sina.Token},
GoogleShare: &hu.Share{Token: CFG.Google.Token},
TencentShare: &hu.Share{Token: CFG.Tencent.Token},
}
http.Handle("/users", userHandler)
http.Handle("/users/", userHandler)
//and so on ...
//run server
log.Println("start listen: ", CFG.FcgiAddr)
l, _ := net.Listen("tcp", CFG.FcgiAddr)
log.Fatalf("server error is %v", fcgi.Serve(l, nil))
//##select {}
log.Println("end listen")
}
```
build it and deploy behind nginx.
then client query /users/1234567/places, /users/1234567, and so on...
get the response is {blank data}, {normal user(1234567) data} or {normal user(1234567) data}, {normal user(1234567) data}.
same prefix of query, and same handler, looks like it is overload the response by subsequent HTTP request.
How can I do it?
May need me to give an example of a response:
correct response is :
{
"meta": {
"code": 200,
"text": "OK"
},
"data": {
"count": 21,
"place-tag-maps": [{
"id": "95842310160384",
"place-id": "95551731663150",
"tag-id": "95551579750669",
"ct": "2014-07-01T09:07:28Z"
}, {
"id": "95842310160385",
"place-id": "95551731663150",
"tag-id": "95551579750694",
"ct": "2015-01-15T17:41:23Z"
}, {
"id": "96262389694470",
"place-id": "95551731663150",
"tag-id": "95910120456455",
"ct": "2016-07-18T13:11:39Z"
}, ...],
"places": [{
"id": "95551731663150",
"name": "Kam Fung Restaurant",
"address": "G/F, 41 Spring Garden Ln",
"coordinate": {
"latitude": 22.275576,
"longitude": 114.172582
},
"telephone": "+852 2572 0526",
"city-id": "95530516807703",
"city": "Hong Kong",
"country": "Hong Kong",
"type": "4sq",
"ref-id": "4b1613f8f964a520cdb623e3",
"ct": "2016-02-23T07:42:43.565489Z",
"mt": "2017-02-22T09:35:48.302929Z",
"rating": 7.5,
"stats": {
"foursquare": {
"count": 111,
"value": 7.5
},
"spottly": {
"save-count": 12
}
},
"permanent-close": false,
"price": ""
}, ...],
"posts": [{
"collection-id": "95551746474003",
"coordinate": {
"latitude": 22.275576,
"longitude": 114.172582
},
"ct": "2017-02-22T09:35:47Z",
"facebook-tag-users": [],
"id": "97501586849795",
"medias": [],
"message": "",
"mt": "2017-02-22T09:35:47Z",
"owner-id": "96527264645120",
"place-id": "95551731663150",
"share-to": [],
"star": 5,
"status": "Done",
"tags": []
}, ...],
"users": [{
"id": "95551581323446",
"uid": "hk_epicurus",
"uid-ignore-case": "hk_epicurus",
"name": "Hk Epicurus",
"head": "https://d278wa0j9nq2mp.cloudfront.net/uploader/54aa335ddf4e63450002919a.jpeg",
"site": "www.hkepicurus.com",
"location": "Hong Kong",
"description": "Hong Kong Food \u0026 Travel Bear.\nGrew up in Aust, Malaysia, Tokyo \u0026 HK. \nInstagram: EpicurusHongKong\nFacebook, Spottly \u0026 Twitter: HK Epicurus \n微博: 香港美食-伊比\nFacebook Fans Page: http://on.fb.me/1qDyiIk",
"ct": "2013-10-13T19:12:41Z",
"mt": "2015-11-08T15:22:45Z"
}, ...]
}
}
and
{
"meta": {
"code": 200,
"text": "OK"
},
"data": {
"friends": [{
"id": "97331335725056",
"from-id": "97273770803200",
"to-id": "96527264645120",
"ct": "2017-01-23T07:58:41Z"
}],
"user": {
"ct": "2013-04-30T23:30:05Z",
"description": "Founder and Chief Everything Officer of Spottly. Loves to eat. Have a really bad memory. Wants to remember the best places and make travel research better",
"followers": {
"count": 41291
},
"followings": {
"count": 322
},
"head": "https://d278wa0j9nq2mp.cloudfront.net/uploader/525ffac8df4e6347870145ef.jpeg",
"id": "96527264645120",
"location": "Vancouver | Hong Kong | Beijing ",
"mt": "2015-10-27T09:47:12Z",
"name": "Edwyn Chan",
"site": "http://spottly.com/edwyn",
"uid": "edwyn",
"uid-ignore-case": "edwyn"
}
}
}
but mistake response is
{
"meta": {
"code": 200,
"text": "OK"
}
}
and
{
"meta": {
"code": 200,
"text": "OK"
},
"data": {
"friends": [{
"id": "97331335725056",
"from-id": "97273770803200",
"to-id": "96527264645120",
"ct": "2017-01-23T07:58:41Z"
}],
"user": {
"ct": "2013-04-30T23:30:05Z",
"description": "Founder and Chief Everything Officer of Spottly. Loves to eat. Have a really bad memory. Wants to remember the best places and make travel research better",
"followers": {
"count": 41291
},
"followings": {
"count": 322
},
"head": "https://d278wa0j9nq2mp.cloudfront.net/uploader/525ffac8df4e6347870145ef.jpeg",
"id": "96527264645120",
"location": "Vancouver | Hong Kong | Beijing ",
"mt": "2015-10-27T09:47:12Z",
"name": "Edwyn Chan",
"site": "http://spottly.com/edwyn",
"uid": "edwyn",
"uid-ignore-case": "edwyn"
}
}
}
the first response is error. or it's same as the second response.
sequence request is correct response, parallel request is incorrect response.
problem resolved。
the basic reason is this case:
var x = &{...} //init value
fillX(..., x) //fill the fields of x pointer
//here the fields of x pointer is not same to inner of fillX func
so, change to
var x = &{...}
x = fullX(..., x)
the problem resolved.
but why go pointer is the behavior?
Finally, this problem resolved.
Because the http.Handle register path-pattern and handler pair, the handler is construct by register time only-once, not for any request of path-pattern.
if record info within handler, It will been change by after request.

Facebook Graph API /me/Feed V2.4 vs V2.3

I'm trying to access all feeds a facebook user using the Graph API .
However I'm getting quite different responses from V2.3 to V2.4 .
In version 2.4 using the instruction / me / Feed not receive complete information of the posts just returns some fields , while in the previous version had access to all the information. As can be seen the difference in the following answers.
V2.4
{
"data": [
{
"message": "A brincar com o Xico Zé.. ;)",
"created_time": "2015-07-11T18:23:59+0000",
"id": "10153293007088673_120153297333223673"
},
{
"message": "Ana Simões e Pedro Simões este é que é bom para a Liliana Assunção..",
"story": "Diogo Lopes shared Classic Hits 4FM's video.",
"created_time": "2015-07-11T14:20:59+0000",
"id": "10153293007088673_1360153296966998673"
}
],
"paging": {
. . .
}
}
V2.3
{
"data": [
{
"id": "10153129496378673_120153297333223673",
"from": {
"name": "Diogo Lopes",
"id": "10153129496378673"
},
"message": "A brincar com o Xico Zé.. ;)",
"picture": "",
"link": "",
"name": "Diogo Lopes on Instagram: “A brincar com o Xico Zé.. ;)”",
"caption": "Diogo Lopes on Instagram: “A brincar com o Xico Zé.. ;)”",
"description": "A brincar com o Xico Zé.. ;)",
"icon": "https://www.facebook.com/images/icons/post.gif",
"actions": [
. . .
],
"privacy": {
"value": "ALL_FRIENDS",
"description": "Your friends",
"friends": "",
"allow": "",
"deny": ""
},
"type": "photo",
"status_type": "added_photos",
"object_id": "120153297333233673",
"application": {
". . ."
},
"created_time": "2015-07-11T18:23:59+0000",
"updated_time": "2015-07-12T20:50:19+0000",
"is_hidden": false,
"subscribed": true,
"is_expired": false,
"likes": {
. . .
],
"paging": {
. . .
}
},
"comments": {
"data": [
. . .
],
"paging": {
. . .
}
}
},
{
"id": "10153129496378673_1360153296966998673",
"from": {
"name": "Diogo Lopes",
"id": "10153129496378673"
},
"to": {
. . . },
"message": "………....",
"message_tags": {
. . .
},
"story": "Diogo Lopes shared Classic Hits 4FM's video.",
"story_tags": {
"0": [
{
"id": "10153129496378673",
"name": "Diogo Lopes",
"type": "user",
"offset": 0,
"length": 11
}
],
"19": [
{
"id": "125659037470226",
"name": "Classic Hits 4FM",
"type": "page",
"offset": 19,
"length": 16
}
],
"38": [
{
"id": "874724002563722",
"name": "",
"offset": 38,
"length": 5
}
]
},
"picture": "https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xta1/v/t15.0-10/s130x130/11331624_874724179230371_2123630990_n.jpg?oh=701da51ed6690c70ba8d3e7ba5cbb58c&oe=56273FFC&__gda__=1448812275_e37392fe85f01402fa0565b0086df710",
"link": "https://www.facebook.com/ClassicHits4FM/videos/874724002563722/",
"source": "https://video.xx.fbcdn.net/hvideo-xtp1/v/t42.1790-2/11656282_889978921061393_14476072_n.mp4?efg=eyJybHIiOjQ4NCwicmxhIjo1MTJ9&rl=484&vabr=269&oh=a4e7e8ec985cf5374082e5c9639d5b06&oe=55A5ED2C",
"name": "Classic Hits 4FM",
"description": "A Giant Nope!!!
Would you go on this Swiss Ride?",
"actions": [
. . .
],
"privacy": {
"value": "EVERYONE",
"description": "Public",
"friends": "",
"allow": "",
"deny": ""
},
"type": "video",
"status_type": "mobile_status_update",
"created_time": "2015-07-11T14:20:59+0000",
"updated_time": "2015-07-11T21:28:06+0000",
"is_hidden": false,
"subscribed": true,
"is_expired": false,
"likes": {
. . .
],
"paging": { . . . }
},
"comments": {
}
…
}
Someone can help me know how I can get a similar response in V2.4 to V2.3??
Obs. My facebook aplication have user_posts Permission.
Since the upgrade in Graph API i.e. version 2.4. You have to specifically pass a fields parameter with the relevant keyword of which, data you would like to retrieve.
Please refer to this document of Facebook Developers
Changes from v2.3 to v2.4
Declarative Fields
To try to improve performance on mobile networks, Nodes and Edges in
v2.4 requires that you explicitly request the field(s) you need for
your GET requests. For example, GET /v2.4/me/feed no longer includes
likes and comments by default, but GET
/v2.4/me/feed?fields=comments,likes will return the data. For more
details see the docs on how to request specific fields.
An example of v2.4:
<page_id>/feed?fields=id,message,picture,likes,shares,comments