Closed lucianfialho closed 11 months ago
@lucianfialhobp
Thanks for the PR. But I need to reject it.
Meta highly does not recommend this approach.
In their documentation, they mention that you need to pass not the user's current location but the user's home address. The address must be consistent for the same customer. The same user can have a different location in your case. Also, Meta can obtain GEO data from IP by itself.
@lucianfialhobp
Thanks for the PR. But I need to reject it.
Meta highly does not recommend this approach.
In their documentation, they mention that you need to pass not the user's current location but the user's home address. The address must be consistent for the same customer. The same user can have a different location in your case. Also, Meta can obtain GEO data from IP by itself.
No problem :)
My proposal is to pull the city, state and country information directly from the request Headers made available by Google App Engine.
This will give the option for those who are unable to pull this information directly from the client side and still capture this data.
For this to work, I added the specific headers:
x-appengine-city x-appengine-country x-appengine-region
Additionally, I added an option (UpdateWithAppEngineGeoDataFromHeaders) within the fields so that the user can select if they want to use Google App Engine Headers.
If the user selects the option, I rewrite the userData object passing the information acquired from the headers