Facebook Marketing API add AdUser issue - facebook

Previously, when I work with Facebook Marketing API v2.12, I used this method for adding my user to Ad Account https://developers.facebook.com/docs/marketing-api/aduser/v2.12 .
Something like in this article https://rdrr.io/cran/rfacebookstat/man/fbUpdateAdAccountUsers.html
Now, In API v3 and higher this method is not available.
As I understand I should change my code to make those methods work:
https://developers.facebook.com/docs/marketing-api/businessmanager/systemuser
https://developers.facebook.com/docs/marketing-api/reference/ad-account/assigned_users/v3.3
This is too complex.
Maybe someone knows an easier way to add my user to Ad Account ?

Related

Is there a way to update FB Ad URL Parameters using Marketing API?

Is there a way to update ad URL Parameters with marketing api?
It is possible from FB Ads Manager, but we have more than 200 different ads and we want to automatically update their URL params from api instead of doing it manually.
I have checked FB marketing api refference, but couldn't find anything related.
Really need your help here.
UPDATE:
This is for those, who are searching for the same or similar thing.
The mechanics which ties Ad to Post or custom template is Ad Creative. You can find its API capabilities here - https://developers.facebook.com/docs/marketing-api/reference/ad-creative
Unfortunately for Ad Creative you can only update Name, Ad Labels and Status. You can still create new Ad Creative with all desired fields and then assign it to Ad, but there is no way to update its url_tags field.
Right, the creative is basically immutable except for the fields you mentioned. Changing the URL tags could lead to exploits.
Is there a reason to want to edit an existing creative rather than create a duplicate with the URL tags modified?

Facebook Marketing API - no app?

I want to pull ad data (campaigns, ad sets, & metrics like clicks/impressions/ctr) from Facebook using their API and put it into a database. Facebook's documentation says I need to create an app on their site in order to access the API, but that doesn't seem right. I'm not trying to create an app for my fb page, just want to extract data.
My first choice was to use an ODBC driver from
CData
, which does allowed me to successfully pull data from AdAccounts but threw an error when trying to get AdSets or AdStatistics:
OAuthException Code 10: You do not have sufficient permissions to perform this action.
I made sure to add in a target='act_{myAdAccountId}' parameter to the query, as per their documentation, but it didn't help. I figured this meant I didn't configure the driver properly, so maybe I'd have better luck just coding up a solution in python or php.
Next, I tried to run similar API calls using the Graph API Explorer and got the same error message. I created an access token that had all the extended permissions and then made a request to
GET /v2.4/act_{myAdAccountId}/adcampaigns.
This gave me the exact same OAuthException Code 10 error that I was getting through the ODBC Driver.
Can someone confirm whether it's possible to pull data from the API without building an app? If so, what permissions do I need to enable for my account? I'm already an Ad Account Admin in the "Ads Manager", and couldn't find anywhere else to set permissions.
Thanks!
Apps have no direct relation to Pages. You need to create an App for any API access. I did not use the Ads API yet, but i assume you need to use the ads_management permission with your App.
How to create Apps and authorize with the required permissions is explained in the docs: https://developers.facebook.com/docs
Since you asked about Login Review, all the information you need about that can be found in the docs too: https://developers.facebook.com/docs/facebook-login/review
I understand this is an old post, but in case if anyone was looking at a similar situation, I was able to call the Facebook Marketing API without building an app.
I posted a similar answer on another more recent question (Do I need a publicly accessible webserver in order to user Facebook's marketing API?), and was curious if this situation puzzled anyone else, which led me to here.
I wrote my API calls using Python 2.7 on Juypter notebook, and I just followed Facebook's Marketing API documentation and examples, modifying with my access tokens and account information.

Get the username from a linkedin REST API call

I'm using linkedin's Oauth2 stuff to authenticate and incorporate users info on a site I'm working on. I'd like to be able to use the REST API and using the querystring /people/~:(id,site-standard-profile-request) etc[assuming the person with an answer knows the API], to be able to get the user's linkedin username.
The reason I want this is so that I can use a link to view the users profile like this: linkedin.com/in/(username)
The /in/ works for both logged in and non-logged in viewers which is amazing for developers that like simple easy ways of doing things.
I hope that someone out there at least has an answer. I cannot find anything along the lines of 'username' in their API documentation. They might not offer it through this service, but it can't hurt to ask.
I am not aware of a username field offered via the Linkedin People API. The default response from http://api.linkedin.com/v1/people/~ will return a site-standard-profile-request/url. So that will get the logged in users profile url, or substituting the tilde with a id will retrieve somebody elses profile url. Using this url will accomplish the same thing as what your after.

Is Facebook's /me/permissions an undocumented Graph API call?

After looking for ways to check if a user has a given permission, I stumbled upon some obscure reference to /me/permissions, which, lo and behold, works!
For the life of me, I can't find the documentation on the Facebook Documentation - is it deprecated, or simply undocumented?
Given how often facebook changes things, should I even be using this?
They blogged about that:
As part of our efforts to transition
functionality from legacy REST APIs to
the Graph API, we added the ability to
retrieve the list of permissions users
have granted your app by adding the
permissions connection to the User
object.
And is part of the docs on the User object, under connections.

How to do Facebook places search without user facebook authorize

I am still new to Facebook Graph API, and trying to start using facebook places search. (search places by location)
https://graph.facebook.com/search?type=place&center=37.76,122.427&distance=1000
One thing i have noticed is user have to login to their Facebook account to do the search, otherwise the search will be rejected.
Could anyone shine me some light pointing a direction to work around this?
Any links or articles will be appreciated.
Thank you
Yeah, unfortunately I think this is a design flaw (or feature?). By this design, only Facebook authentication users can search for places. Others cannot. It seems more like a capability designed to serve end users than actual apps.
The flaw I see is that many applications out there are trying to offer optional Facebook integration but don't make it obligatory. Unfortunately, as it stands now, the places API can't be used as a service for apps just additional functionality for FB users.
What you are trying to do is not possible. Per the error message: "An access token is required to request this resource." Most of the graph api requires an authenticated user (ie an access token) to make requests. There are only a few calls that can be made without the access token and this is not one of them.