How to get Facebook access token using Python library?

2024/9/30 9:35:40

I've found this Library it seems it is the official one, then found this, but everytime i find an answer the half of it are links to Facebook API Documentation which talks about Javascript or PHP and how to extract it from links!

How do i make it on simple python script?

NB: what i realy dont understand, why using a library and cant extract token if we can use urllib and regex to extract informations?

Answer

Not sure if this helps anyone, but I was able to get an oauth_access_token by following this code.

from facepy import utils
app_id = 134134134134 # must be integer
app_secret = "XXXXXXXXXXXXXXXXXX" 
oath_access_token = utils.get_application_access_token(app_id, app_secret)

Hope this helps.

https://en.xdnf.cn/q/71103.html

Related Q&A

How to convert shapefile/geojson to hexagons using uber h3 in python?

I want to create hexagons on my geographic map and want to preserve the digital boundary specified by the shapefile/geojson as well. How do I do it using ubers h3 python library? Im new to shapefiles…

Python mypy: float and int are incompatible types with numbers.Real

I am new to Pythons static typing module mypy. I am trying to append ints and floats to an array, which I typed statically to be Real. But mypy says that they are incompatible types with Real. I though…

Search/Find functionality in QTableView

I have a QWidget and inside that, there is a QTableView. I need to have a find functionality on the first column of the table, so when I click on Ctrl+F, a find dialog will pop-up.class Widget(QWidget)…

How does searching with pip work?

Yes, Im dead serious with this question. How does searching with pip work?The documentation of the keyword search refers to a "pip search reference" at https://pip.pypa.io/en/stable/user_gui…

keras LSTM feeding input with the right shape

I am getting some data from a pandas dataframe with the following shapedf.head() >>> Value USD Drop 7 Up 7 Mean Change 7 Change Predict 0.06480 2.0 4.0 -0.000429 …

Problems with a binary one-hot (one-of-K) coding in python

Binary one-hot (also known as one-of-K) coding lies in making one binary column for each distinct value for a categorical variable. For example, if one has a color column (categorical variable) that ta…

How to hide the title bar in pygame?

I was wondering does anyone know how to hide the pygame task bar?I really need this for my pygame program!Thanks!

Deleting existing class variable yield AttributeError

I am manipulating the creation of classes via Pythons metaclasses. However, although a class has a attribute thanks to its parent, I can not delete it.class Meta(type):def __init__(cls, name, bases, dc…

Setting global font size in kivy

What is the preferred way, whether through python or the kivy language, to set the global font size (i.e. for Buttons and Labels) in kivy? What is a good way to dynamically change the global font size…

What is the difference between load name and load global in python bytecode?

load name takes its argument and pushes onto the stack the value of the name stored by store name at the position indicated by the argument . load global does something similar, but there appears to …