I'm trying to get a Facebook video object from a timeline post :
I'm getting the posts from graph api /me/home
I can easily get the photo object via the returned object_id
The problem is there is no object_id value for video post type
{
"id": "750834774_10152138100019775",
"from": {
"id": "750834774",
"name": "Emilie Volpi"
},
"message": "haha le monde qui fait une analyse geopolitique de games of thrones^^ une bonne manière de se remettre à jour pour la nouvelle saison demain !!!!!",
"picture": "https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCclQTe2bPMIcrY&w=130&h=130&url=http%3A%2F%2Fs2.dmcdn.net%2FEHFV4%2F526x297-mO8.jpg",
"link": "http://www.dailymotion.com/video/x1lu3ke_game-of-thrones-comprendre-la-crise-a-westeros-en-4-minutes_news",
"source": "http://www.dailymotion.com/swf/video/x1lu3ke?autoPlay=1",
"name": "« Game of Thrones » : comprendre la crise à Westeros en 4 minutes",
"caption": "www.dailymotion.com",
"description": "Guerre des cinq rois, pression des marcheurs blancs et des sauvageons au nord, retour des dragons à l’est… le Royaume des Sept couronnes est plongée dans une crise politique sanglante depuis plus d’un an. Le Monde vous propose un décryptage de la crise en quatre minutes mais attention… spoilers !",
"icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yj/r/v2OnaTyTQZE.gif",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/750834774/posts/10152138100019775"
},
{
"name": "Like",
"link": "https://www.facebook.com/750834774/posts/10152138100019775"
}
],
"privacy": {
"value": ""
},
"type": "video",
"status_type": "shared_story",
"application": {
"name": "Links",
"id": "2309869772"
},
"created_time": "2014-04-06T09:39:57+0000",
"updated_time": "2014-04-06T09:39:57+0000",
"likes": {
"data": [
{
"id": "1283687218",
"name": "Max Imus"
}
],
"paging": {
"cursors": {
"after": "MTI4MzY4NzIxOA==",
"before": "MTI4MzY4NzIxOA=="
}
}
}
},
As you can see there is no video id so I can't get the video
My goal is to retrieve the embed_html from the video object
Please tell me how to do that (graph api or FQL query)
I think you can only get the embed_html for videos which are actually hosted on Facebook. The example you're using is hosted on dailymotion and only referenced in the post. That's the main difference.
I guess you could use the following FQL to get the embeddable video url:
select attachment.media.video.source_url from stream where post_id='750834774_10152138100019775'
You can then include it dynmically in your page if you pass the source_url content to an iFrame as src attribute for example
Related
I have designed a website to use windows authentication. Everything works as expected. But my recent task was to integrate the site into Microsft Teams. So I have created de manifest and install de app in teams. So When I enter the site it is asking for windows credentials and user validated, but after pass the credentials the page doesn t load, it stay in blank. The web site is working succesfully in any web explorer.
Note: I use the Active Directory of my company to validate users (Not Azure AD).
Thanks in advance.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.0.1",
"id": "276adadb",
"packageName": "TI_MesaAyuda",
"developer": {
"name": "Enzo",
"websiteUrl": "",
"privacyUrl": "https://tickets.Prueba.Teams",
"termsOfUseUrl": "https://tickets.Prueba.Teams"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Mesa de ayuda TI",
"full": "Sistema de mesa de ayuda"
},
"description": {
"short": "Mesa de ayuda de ",
"full": "Sistema de mesa de ayuda de Megalabs "
},
"accentColor": "#FFFFFF",
"staticTabs": [
{
"entityId": "Ticket1",
"name": "Mesa de ayuda",
"contentUrl": "https://tickets.prueba.teams",
"websiteUrl": "https://tickets.prueba.teams",
"scopes": [
"personal"
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"tickets.prueba.teams",
"https://tickets.prueba.teams"
]
}
I want to update account linking information of action on google with gactions or https://actions.googleapis.com/v2/.
When i execute gactions this only update the action information but manifest and account linking are not update.
This is the action.json:
{
"manifest": {
"displayName": "The MSH",
"invocationName": "The MSH",
"shortDescription": "Hub domotico per la gestione della casa",
"longDescription": "Hub domotico per la gestione della casa e di tutti i dispotivi Wi-Fi",
"companyName": "MSH",
"contactEmail": "dsfsd.sdfsf.93#gmail.com",
"sampleInvocation": [
"Fammi parlare con the MSH",
"Voglio parlare con the MSH"
],
"introduction": "Puoi usare questo agent per comunicare con tutti i dispositivi collegati",
"voiceName": "female_1"
},
"accountLinking": {
"clientId": "sdfsf",
"clientSecret": "retdrtfer",
"grantType": "AUTH_CODE",
"authenticationUrl": "https://sdfs.ngrok.io/oauth",
"accessTokenUrl": "https://sdfs.ngrok.io/token",
"assertionTypes": [
"UNKNOWN_ASSERTION_TYPE"
]
},
"actions": [{
"name": "actions.devices",
"deviceControl": {
},
"fulfillment": {
"conversationName": "automation"
}
}],
"conversations": {
"automation" :
{
"name": "automation",
"url": "https://asdada.ngrok.io/api/home"
}
},
"locale": "it"
}
I was using structured data on on the products and I had not any error when I used it. More or less a month ago I changed structured data for JSON-LD. These change on the Goole Search console does not appear but it detect I stoped use structured data.
Here there is a real JSON-LD (is not proof) of one product:
<script type="application/ld+json">
{
"#context": "http://schema.org/",
"#type": "Product",
"name": "Cumlaude Sunlaude Cover Ip-30 10 G.",
"image": "https://farmaciaribera.es/media/catalog/product/p/l/pl_1_1_9743.jpg",
"description": "Cumlaude Sunlaude Compacto SPF 30 está indicado para la protección solar del rostro, ayuda a corregir las imperfecciones cutáneas actuando como un compacto maquillaje de alta protección solar. Está especialmente indicado para pieles con manchas (cloasma,",
"sku": "200089",
"brand": {
"#type": "Thing",
"name": "Dermofarm"
},
"aggregateRating": {
"#type": "AggregateRating",
"bestRating": 10,
"worstRating": 9,
"ratingValue": 10,
"reviewCount": 352
},
"offers": {
"#type": "Offer",
"priceCurrency": "EUR",
"availability": "http://schema.org/InStock",
"price": "21.22"
}
}
And here you can see how Tensting tool data structured detect the product without any problem.
Also I have looking for information on Stack Overflow, in this post is confirmed Google detect product rich cards.
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
I'm writing an app that gathers info from a users Facebook notifications. Using the Graph Explorer, I request:
me/notifications?include_read=true
and this returns a bunch of data. Each item is a notification item you would see when logging into Facebook. For example (ID/names changed slightly):
{
"id": "notif_630262196_168132987",
"from": {
"name": "John Bloggs",
"id": "822724665"
},
"to": {
"name": "Dermot Bloggs",
"id": "680265196"
},
"created_time": "2013-01-23T22:58:28+0000",
"updated_time": "2013-01-23T22:58:28+0000",
"title": "John Bloggs commented on your link: \"Goodbye Great Barrier Reef. Goodbye...\"",
"link": "http://www.facebook.com/<removed>/posts/330788937030559?comment_id=1702155",
"application": {
"name": "Links",
"id": "2309869772"
},
"unread": 0,
"object": null
}
The notification is in relation to a comment, but the "title:" field gets truncated if it is too long.
Is there a clean way I can programmatically access the comment directly, so I can get all the text, even if it is a 1000 character comment?
Thanks! :-)
You should be able to get the comment by parsing the link field and querying:
/330788937030559_1702155
or
/POSTID_COMMENTID
When I tested this on my account, I am getting a comments object in the returned data, with the full text of the comments. I've got most permissions enabled in my Graph API. I suspect adding read_stream to the permissions is what will give you this data.
You can avoid parsing! I've been doing a lot of experimentation with notifications and getting what I've called the 'source' object (the source object being the Facebook Graph Object from which the notification originates). Unfortunately, I can't find any documentation on how exactly this mechanism works, but if your app has been granted a lot of permissions, the "object" field which in the JSON you posted is null will actually be populated with the 'source object'. Instead of just "object" : null it will look like this:
"object": {
"id": "587140489_588632201147717",
"from": {
"name": "Dave Rodríguez",
"id": "587140489"
},
"message": ":D ",
"picture": "https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-prn1/632550_478955408819349_478954732152750_60483_1892_t.jpg",
"link": "https://www.facebook.com/photo.php?v=478954732152750",
"source": "http://video.ak.fbcdn.net/hvideo-ak-prn1/v/754708_478955348819355_1792301950_n.mp4?oh=c7295ccfc3773f24de931e4c29f512ce&oe=513F1728&__gda__=1363127340_9302c108824176369427a0b17491b800",
"name": "¡¡¡EL SECRETO DE LA CHANCLA!!!!",
"description": "EL SECRETO DE LAS MADRES, EL MÁS UTILIZADO EN TODAS LAS GENERACIONES, VÉALO USTED MISMO Y ((COMPARTA))!",
"properties": [
{
"name": "Length",
"text": "1:13"
}
],
"icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yD/r/aS8ecmYRys0.gif",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/587140489/posts/588632201147717"
},
{
"name": "Like",
"link": "https://www.facebook.com/587140489/posts/588632201147717"
}
],
"privacy": {
"value": ""
},
"type": "video",
"status_type": "shared_story",
"object_id": "478954732152750",
"application": {
"name": "Video",
"namespace": "video",
"id": "2392950137"
},
"created_time": "2013-03-10T20:45:20+0000",
"updated_time": "2013-03-10T20:45:20+0000",
"likes": {
"data": [
{
"name": "Adrian Guerra Cuenta Verificada",
"id": "674364748"
}
],
"count": 1
},
"comments": {
"count": 0
}
}
I hope somebody more knowledgeable than me can tell us exactly what permissions we need to see this field populated. I'd figure it out myself but there are so many permissions that brute-forcing the SUM(nCk(77,k),k,1,77)=151115727451828646838271 possible combinations of permissions would take a very long time.