The City Search call used to return a response where each city had the form:
{
"name": "Dublin, CA",
"key": 220522764,
"subtext": "CA, United States"
}
Now the API returns:
{
"name": "Dublin",
"key": 220522764,
"subtext": "California, United States"
}
The first format is still listed in the API docs here: https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/
Is this a permanent change?
Our apologies for this change - we've reverted this change and will take precaution to avoid these things in the future. Thank you for the report.
We've added another parameter to use in your query if you want to get the city name without the state. Documentation updated: https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/
Yes, last week. No warning from Facebook.
Related
I am new to blockchain and i am trying to play with blockchain so I used metaplex and candy-machine to upload and mint dummy nft's which is working fine. The opensource repositories that I am playing with are below:
https://github.com/metaplex-foundation/metaplex
https://github.com/exiled-apes/candy-machine-mint
Then for learning purposes, I wanted to divide minting and secondary sales into more than one wallet so I changed JSON and added three test wallets into the creator's array.
{
"name": "#0",
"symbol": "%$%",
"description": "description goes here",
"seller_fee_basis_points": 500,
"image": "image.png",
"external_url": "",
"edition": 0,
"attributes": [
{
"trait_type": "Background",
"value": "Street"
}
],
"properties": {
"files": [
{
"uri": "image.png",
"type": "image/png"
}
],
"category": "image",
"creators": [
{
"address": "<public address 1>",
"share": 34
},
{
"address": "<public address 1>",
"share": 33
},
{
"address": "<public address 1>",
"share": 33
}
]
}
}
But the problem is splitting is happening on secondary sales and not on minting. On minting the wallet set as treasury resource is getting all amount. I want to split the transaction amount on minting too.
Interestingly, I found this quote in the metaplex documentation:
The SPL Metadata program supports storing up to five co-creators that
share potential future profits from sales for the items as defined by
seller_fee_basis_points . Each creator needs to be added as part of
the minting process and is required to approve metadata that was used
in his name using the sign_metadata endpoint. Unverified artwork
cannot be sold with Metaplex.
During the first sale, creators share in 100% of the proceeds, while
in follow up sales, they share in proceeds as a percentage determined
by seller_fee_basis_points. Whether or not a metadata is considered in
second sale or not is determined by the primary_sale_happened boolean
on the Metadata account.
My interpretation of this is that the expected behavior should be for the initial sale to get divided between creators using the ratios defined by each creator's share. Sounds like you're experiencing something different.
Keep in mind that this documentation is for the parent project. Candy-machine-mint seems to be a fork and they may have altered some of that behavior.
The source code of the code of the contract you are intersted in can be found here: https://github.com/metaplex-foundation/metaplex-program-library/blob/master/nft-candy-machine/program/src/lib.rs
At line 247 the transfer of sol is called to a single treasury address of the candy machine. To change it to multiple addresses this contract would have to be updated and redeployed.
Another alternative I have seen deployed in the solana community atm is a second contract which will split the funds evenly. Unfortunately, the creator of this contract has been charging for it and has not open-sourced it yet. They can be found on the metaplex discord if you are interested.
If I need to update the name or address of a contact, giving the field as "names, addresses" works.
How do I need to give the updateMask to update a specific field like "middleName" alone.
Providing updateMask as "names.middleName" does not work and throws the following error:
{
"error": {
"code": 400,
"message": "Invalid updatePersonFields mask path: \"names.middle_name\". Valid paths are documented at https://developers.google.com/people/api/rest/v1/people/updateContact.",
"status": "INVALID_ARGUMENT"
}
}
Anyone help?
Answer:
You need to use names as updatePersonFields, but all names need to be specified. This may be a bug, as linked below, but it is also not clear from the documentation.
More Information:
It is possible this is a bug, though until a response is obtained from the issue tracker report (which I assume was you -but if not - hit the star to help it gain more attention) about this it is not possible to know for sure.
While FieldMasks do accept sub-fields, these are not specified on the updatePersonFields documentation page, only the broader names.
You can see the list of definitely supported fields here under the Query Parameters.
Current Workaround:
While waiting for Google to respond to the bug report, the only way you can get around this is by using the names field mask, but also including the firstName and lastName parameters too when making the patch:
{
"names": [
{
"givenName": "Rafa",
"middleName": "Guillermo",
"familyName": "Rocks"
}
],
"etag": "%XxXXXx00XxxXXXXXXxXXXX00XXXXXXxXxxX0"
}
Remember: If you leave out any of these fields this is tantamount to replacing it with empty string - so be careful!
I have a requirement in which I need to access the creative format type for each adCreative.
I explored the API and figured that this information is stored in Ad Creative Object Story Spec, however, I am not able to query this object.
This is the request I am making
https://graph.facebook.com/v2.11/<account_id>/adcreatives?fields=id,adset_id,name,creative,image_crops,object_story_id,image_url,image_hash,object_type,object_id,object__story_id,object_url&limit=500&access_token=<access_token>
This is not returning object_story_id and object_story_spec field only.
What am I missing here?
Thanks in advance.
Request those fields on the adcreative edge itself. ie your first call will return a list of adcreative ids.
{
"data": [
{
"id": "23842732907210427"
},
{
"id": "23842732907020427"
}]}
So you would call graph.facebook.com/23842732907210427?fields=object_story_id&access_token=USERACCESSTOKEN to retrieve the spec for that ad creative.
You can also nest queries so you may be able to retrieve the spec in a single call but I have been unsuccessful attempting this. https://developers.facebook.com/docs/graph-api/using-graph-api
I am trying to gather information about the number of comments from a facebook past that include a tag to a user, i.e. when you type #Joe Bloggs.
I know you can get all comments by either getting using the Comments edge for a post v2.8/[Postid]/comments or by the comment id directly v2.8/[comment-id]
But the message field that is returned is plain text and includes no indication of tags. e.g. something like:
{
"created_time": "2017-02-28T09:31:08+0000",
"from": {
"name": "Fred Bloggs",
"id": "123"
},
"message": "Joe Bloggs look at this",
"id": "1234"
}
Is it possible to get this somehow?
You need to include the field message_tags in your request. It will give you an array of profiles tagged in this comment.
I am interested in retrieving a Facebook group members' Bio information.
I have created an app where I have requested permission of about user_about_me and the app is under review for submission.
I have coded for the app in JSP but it can only select name, gender, last_name, first_name only. It is not selecting the Bio information.
I face the same problem even in the graph API explorer, when I use
{group_ID}/members
I can retrieve list of all group members. But I can not see more details than the following:
"data": [
{
"name": "name",
"administrator": false,
"id": "USER ID"
},
..
When I click on the ID (or enter the ID in the explorer), I can only get the following:
{
"id": "member_ID",
"first_name": "firstname",
"last_name": "lastname",
"link": "https://www.facebook.com/app_scoped_user_id/...",
"name": "name ",
"updated_time": "2015-02-07T10:02:58+0000"
}
This is not showing the Bio information.
when I enter the following:
{member_ID}?fields=bio
I just get
{
"id": "10153223503039309"
}
I will appreciate if someone please identify me the problem. I believe this problem will also solve my code problem, where at the moment I am unable to retrieve the group member's Bio information too.
Is it possible that the problem will be resolved after the app's acceptance, which is under review?
Thanks you very much.
Syed
You canĀ“t just grab more information from the user just because he is a member of some group. You would have to let him authorize your App with the correct permissions in order to get more data.