Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New with python
#1
Hello,

I am new with Python but I know some php.

Anyone has experience with the facebook ads management API?

I want to get some data from my campaigns to track my cost per conversions.

Do you think this is too complex for a newbie?

Any suggestions?

Thanks
Reply
#2
suggest you start here: https://python-forum.io/Thread-Web-Scraping-part-1
Reply
#3
Thanks.

Do you think this will help with the facebook api?
Reply
#4
(Mar-14-2017, 09:49 AM)kamaleon Wrote: Do you think this will help with the facebook api?
It's more about web-scraping without using an API.

For Facebook there is Python SDK for Facebook's Graph API
Then you follow there doc how to use it.
Eg:
import facebook

token = 'your token'
graph = facebook.GraphAPI(token)
profile = graph.get_object("me")
friends = graph.get_connections("me", "friends")
friend_list = [friend['name'] for friend in friends['data']]

print(friend_list)
If you look at Facebook Graph API doc you see HTTP GET method that return JSON.
Here is Requests an obvious choice to assess that data directly.
Reply
#5
Not exactly that one, but this one

https://developers.facebook.com/docs/mar...buying-api

Any tips?

What is the difference between the 2?
Reply
#6
You need to install Ads API SDK for Python
pip install facebookads
The in your link there is Python code.
from facebookads.adobjects.campaign import Campaign

campaign = Campaign(parent_id='act_<AD_ACCOUNT_ID>')
campaign.update({
    Campaign.Field.name: 'My Campaign',
    Campaign.Field.objective: Campaign.Objective.link_clicks,
})

campaign.remote_create(params={
    'status': Campaign.Status.paused,
})
Reply
#7
Hello I am new to python and am trying to create my own multiple choice quiz I want it to tell me if the answer I type in is write or wrong how do I do this????
Reply
#8
Great, I will have a look and see what I can do :)
Reply
#9
(Mar-14-2017, 04:02 PM)Hockeydude61 Wrote: Hello I am new to python and am trying to create my own multiple choice quiz I want it to tell me if the answer I type in is write or wrong how do I do this????

1) Start your own thread.  Hijacking something unrelated to what you're interested doesn't help anyone.
2) When you start your own thread, feel free to add more details about what that has to do with facebook ads.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020