3rd party metadata links from ACRCloud - acrcloud

When i get 'external_metadata' how can I make Spotify and iTunes links on ACRCloud metadata. How can I make a working link?
"spotify": {
"track": {
"id": "1H8XgJUdCuG22jSVTi6nkL"
}
},
"itunes": {
"track": {
"id": 529354556
}

For Spotify: You can refer to Spotify Developers (https://developer.spotify.com/) to make up the URL. So you need to put the track id at the end of this URL: https://open.spotify.com/track/{id} e.g. https://open.spotify.com/track/1H8XgJUdCuG22jSVTi6nkL
For iTunes, You can refer to iTunes Affiliate Resource (https://affiliate.itunes.apple.com/resources/documentation/apple-music-best-practices-for-app-developers/) to make up the URL.

Related

In Facebook marketing API, where to set target URL of an Ad Campaign

I would like to create an Ad Campaign with the Marketing API but I don't know where I can set the target URL of this campaign.
I can set the objective of the campaign to WEBSITE_CLICKS but where to set the URL it will goes to?
If I use the Web Ads Manager, when I click create campaign and select the objective of "web site click", then I have to enter the promoted URL. But with the API I don't find where I can set this.
Thanks,
Julien
I finally found where I can find the promoted URL of my Ad.
In fact when you generate your Ad through the Web Ad Manager it will create a hidden post on the Facebook page that is used for the Ad (see this blog post). And Ad creative use an object_story_id and object_story_spec to link to it. So I can find my link in the field 'object_story_spec' of the creative.
->/v2.3/6024899447563/adcreatives?fields=object_story_spec
result:
{
"data": [
{
"object_story_spec": {
"page_id": "1574237802836192",
"link_data": {
"link": "http://www.mylink.com/destination",
"message": "Click!",
"name": "My test",
"description": " ",
"image_hash": "9b25eba026f1ad716010963db25fabb8",
"multi_share_optimized": false
}
},
"id": "6024899447563"
}
],
"paging": {
"cursors": {
"before": "NjAyNDg5ODQ0ODE2Mg==",
"after": "NjAyNDg5OTU0ODE2Mg=="
}
}
}
So the link is in object_story_spec.link_data.link of the creative of the Ad.
The Ad Set Object can contain an Promotion Object:
https://developers.facebook.com/docs/marketing-api/adset#promoted_object
Or it can be contained in the Ad Creative as a link_url:
https://developers.facebook.com/docs/marketing-api/adcreative/v2.3
If Campaign Object has the objective set ( which is optional ), ad sets and ad creative will be validated against the objective.
You may also need to query connection objects, especially if you want a specific Facebook Page or Tab:
https://developers.facebook.com/docs/marketing-api/connectionobjects/v2.3

Create a Link Ad for a Facebook object (event url)

In business manager it's possible to create a Link Ad with a Facebook Event url. I like to do the same with Facebook Ads API but facing a permissions error.
The Ad Creative of an Ad created in business manager looks like this one:
{
"object_story_spec": {
"page_id": "24188824589????",
"link_data": {
"link": "https://www.facebook.com/events/25595316793????/",
"message": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"image_hash": "cbb1f226fd5fe47c826dd1cad117????"
}
}
}
When I am trying to create the same Ad Creative via Ads Api I get an error message like the following:
{
"error": {
"message": "Invalid parameter",
"type": "FacebookApiException",
"code": 100,
"error_subcode": 1349118,
"is_transient": false,
"error_user_title": "Disallowed Post Link",
"error_user_msg": "One or more of the given URLs is not allowed by the Stream post URL security app setting. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. Read https://developers.facebook.com/docs/facebook-login/security/ to learn more about app settings related to security."
}
}
I get the same error if I try to create a Link Post with Graph API separately to use as object_story_id.
We really need this kind of Ads for our business. In stream ads perform much better than display ads. Is there anyway to create ads like this one via Ads API?
You should check the migration settings for your app to see if "Steam post URL security" is enabled.
This prevents URLs being posted by your app which do not link to a domain listed in your app settings.

Posts from Instagram not showing up on Facebook Open Graph API

I have an issue with Facebook OpenGraph API. Whenever I request data using either '/home' or '/feed', none of the posts from Instagram showed up.
I've been googling around and apparently some people raised the same issue with no solution yet. And I read some that the issue not only affecting posts from Instagram, but also other third-party app/device/platform.
Even the ticket posted on Facebook's dev page seems somewhat dead (no continuation). Link: https://developers.facebook.com/bugs/110563582419837/
If any of you guys also stumbled on this issue and has some ideas/pointers/links, please do share and let's discuss it.
Much appreciated. Cheers!
There are two bug reports in Facebook's bug tracker about this:
https://developers.facebook.com/bugs/110563582419837 and https://developers.facebook.com/bugs/202119973248747
The core reason is that the photos are attached to Open Graph actions as User Generated Photos and not via the regular Photo upload API.
As such, the regular photos permissions don't grant access to them and you need the user to specifically allow you the access their Open Graph activity for the app that posted the actions. The bug reports above are accepted on the basis that this appears to be an oversight in the case of actions with user generated photos, but it could also be by design in which case what i've outlined below as a workaround would be the only supported way to do this:
If you specifically need to request Instagram (or another Open Graph photos app) photos for a user, you can ask for Permission to access the actions posted by that app.
For Instagram photos you can do this by requesting the user_actions:instapp permission and once you've done that the Instagram Photos album will no longer appear to be empty, and the Instagram activity will appear in the feed connection.
To find out the namespace for an arbitrary app, access https://graph.facebook.com/<APP ID> and look for the namespace field,
e.g. for instagram, a call to https://graph.facebook.com/124024574287414/?fields=id,namespace returns:
{
"id": "124024574287414",
"namespace": "instapp"
}
A sample photo from my own /feed connection, retrieved with the read_stream, user_photos, user_actions:instapp permissions, is:
{
"data": [
{
"id": "[SNIPPED]",
"from": {
"name": "[SNIPPED]",
"id": "[SNIPPED]"
},
"picture": "[SNIPPED]",
"link": "https://www.facebook.com/photo.php?fbid=[SNIPPED]",
"icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yb/x/StEh3RhPvjk.gif",
"privacy": {
"value": ""
},
"type": "photo",
"object_id": "[SNIPPED]",
"application": {
"name": "Instagram",
"namespace": "instapp",
"id": "124024574287414"
},
"created_time": "2013-01-07T17:33:04+0000",
"updated_time": "2013-01-07T17:33:04+0000",
"comments": {
"count": 0
}
},
I can also access the /photos connection of my 'Instagram Photos' album with the same permissions, and can access all Instagram 'take' actions (i.e the photos) at /me/instapp:take
Facebook employee here. Looking at the internal task that is tracking this issue, all I can say at this time is that this is an issue that we are currently aware and investigating into. If you would like to be notified of any updates, be sure to click "subscribe" on the bug report.
For the time being, I recommend finding the album ID of the user named "Instagram Photos", then calling a GET request to /INSTAGRAM_ALBUM_ID/photos to get their Instagram photos. On the Graph API Explorer tool, I confirm that I am able to fetch all of my instagram pictures. Since my album is public, you should be able to view them as well.

Remove facebook like using graph api

Using GET https://graph.facebook.com/288095787880494/likes/159222380758097 returns me
{
"data": [
{
"name": "Vote For Prophet Hazrat Muhmmad (PBUH) the best man of world",
"category": "Cause",
"id": "159222380758097"
}
],
"paging": {
"next": "https://graph.facebook.com/288095787880494/likes/159222380758097?format=json&limit=5000&offset=5000&__after_id=159222380758097"
}
}
Now i want to remove this like. How do I do that? When I use HTTP Delete I get the following error:
{
"error": {
"message": "(#3) App must be on whitelist",
"type": "OAuthException"
}
}
You are not allowed to remove likes for Facebook Pages. Only for post, comment and URL's owned by your application.
To be able to do this your application must be whitelisted by Facebook which can only be done by contacting Facebook directly (and will probably require some kind of agreement and cost you money as well...)
Sounds like maybe two issues. Maybe the same. But try what I suggest in #2. Maybe facebook is spitting out a false/misleading error message.
Your app and or page is currently on the facebook naughty list. "Error code: (#3) App must be on whitelist"
You need to use a PAGE access token and not a USER access token. "It says I need to switch back to my Username in order to do that though as I mentioned earlier this link has been liked by the Page"

Facebook – Does a page exist for this URL?

I'm making a webpage/SEO checking page, where I can put in a URL and it will tell me various facts about the page.
I'd like to be able to tell if there is a Facebook page associated with the URL. Is this possible using the API, or by other means?
For instance, https://www.facebook.com/focalstrategy links to http://www.focalstrategy.com/ on the info tab – is there a way to go the other way and enter the URL and find the page(s)?
(Bonus points – anyone know of a way to do the same for Twitter accounts)
I don't think this is possible. Using the API, you can retrieve info about the url:
http://graph.facebook.com/?id=http://www.focalstrategy.com/
Would return:
{
"id": "http://www.focalstrategy.com/",
"shares": 38
}
Now I'm note sure if using the Open Graph Meta Tags would help return more data (still not what you need), but here is my website info without trailing slash:
http://graph.facebook.com/?id=http://www.masteringapi.com
Would return:
{
"id": "109784969102047",
"name": "MasteringAPI.com",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/276619_109784969102047_474156823_s.jpg",
"link": "http://www.masteringapi.com/",
"likes": 25,
"category": "Website",
"website": "http://www.masteringapi.com",
"description": "Master Facebook, Google and Twitter APIs! Learn Facebook Application Development Now!",
"can_post": true
}