GraphHandler


NameGraphHandler JSON
Version 0.1.3 PyPI version JSON
download
home_page
SummaryUnofficial Facebook Graph API Handler
upload_time2023-11-18 07:33:10
maintainer
docs_urlNone
authorAmbar Rizvi
requires_python
license
keywords python facebook graph api social media instagram meta meta api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GraphHandler
## FBGraphHandler

FBGraphHandler is a Python library that simplifies the process of interacting with Facebook's Graph API. It provides methods for authenticating users, retrieving user details, posting text and video feeds, and more.

## Installation

You can install FBGraphHandler using pip:

```bash
pip install FBGraphHandler
```
## Usage

### Importing FBGraphHandler
```python
from FBGraphHandler import FBGraphHandler
```

### Initializing FBGraphHandler
```python
# Create an instance of FBGraphHandler
graph_handler = FBGraphHandler()

# Configure FBGraphHandler with your Facebook App credentials
graph_handler.Config(client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET", version="14.0")
```
### Generating an Authorization URL
```python
# Generate an authorization URL for users to complete the authentication process
auth_url = graph_handler.GenerateAuthURL(redirect_uri="YOUR_REDIRECT_URI", scopes=["public_profile", "email"])
```
### Exchanging Authorization Code for Access Token
```python
# Exchange the authorization code for an access token
access_token = graph_handler.ExchangeCodewithToken(code="AUTHORIZATION_CODE")
```
### Getting User Details
```python
# Get user details using the access token
user_details = graph_handler.GetUserDetails(access_token="ACCESS_TOKEN")
```
### Posting a Text Feed
```python
# Post a text feed to a user or page
post_id = graph_handler.PostTextFeed(text="Hello, Facebook!", id="PAGE_OR_USER_ID", access_token="ACCESS_TOKEN")
```
### Posting a Video Feed
```python
# Post a video feed to a user or page
post_id = graph_handler.PostVideoFeed(text="Check out this video!", id="PAGE_OR_USER_ID", access_token="ACCESS_TOKEN", video_url="VIDEO_URL")
```
### Posting Media (Text, Photos, or Videos)
```python
# Post text, photos, or videos to a user or page
media_urls = ["PHOTO_URL_1", "PHOTO_URL_2"]
post_id = graph_handler.PostToFacebook(text="My Facebook post", media_urls=media_urls, access_token="ACCESS_TOKEN", id="PAGE_OR_USER_ID", isVideo=False)
```
## Documentation
For detailed documentation and more information about available methods and parameters, please refer to the <a href='https://github.com/Ambar-06/python-graph-handler'>official documentation</a>.

## License
This project is licensed under the MIT License - see the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "GraphHandler",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,facebook,graph api,social media,instagram,meta,meta api",
    "author": "Ambar Rizvi",
    "author_email": "<brannstrom9911@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d2/2b/4ea88ce9c155fa7c5c577f15d34e69c064021051856fa54c5a07cfb3c255/GraphHandler-0.1.3.tar.gz",
    "platform": null,
    "description": "# GraphHandler\r\n## FBGraphHandler\r\n\r\nFBGraphHandler is a Python library that simplifies the process of interacting with Facebook's Graph API. It provides methods for authenticating users, retrieving user details, posting text and video feeds, and more.\r\n\r\n## Installation\r\n\r\nYou can install FBGraphHandler using pip:\r\n\r\n```bash\r\npip install FBGraphHandler\r\n```\r\n## Usage\r\n\r\n### Importing FBGraphHandler\r\n```python\r\nfrom FBGraphHandler import FBGraphHandler\r\n```\r\n\r\n### Initializing FBGraphHandler\r\n```python\r\n# Create an instance of FBGraphHandler\r\ngraph_handler = FBGraphHandler()\r\n\r\n# Configure FBGraphHandler with your Facebook App credentials\r\ngraph_handler.Config(client_id=\"YOUR_CLIENT_ID\", client_secret=\"YOUR_CLIENT_SECRET\", version=\"14.0\")\r\n```\r\n### Generating an Authorization URL\r\n```python\r\n# Generate an authorization URL for users to complete the authentication process\r\nauth_url = graph_handler.GenerateAuthURL(redirect_uri=\"YOUR_REDIRECT_URI\", scopes=[\"public_profile\", \"email\"])\r\n```\r\n### Exchanging Authorization Code for Access Token\r\n```python\r\n# Exchange the authorization code for an access token\r\naccess_token = graph_handler.ExchangeCodewithToken(code=\"AUTHORIZATION_CODE\")\r\n```\r\n### Getting User Details\r\n```python\r\n# Get user details using the access token\r\nuser_details = graph_handler.GetUserDetails(access_token=\"ACCESS_TOKEN\")\r\n```\r\n### Posting a Text Feed\r\n```python\r\n# Post a text feed to a user or page\r\npost_id = graph_handler.PostTextFeed(text=\"Hello, Facebook!\", id=\"PAGE_OR_USER_ID\", access_token=\"ACCESS_TOKEN\")\r\n```\r\n### Posting a Video Feed\r\n```python\r\n# Post a video feed to a user or page\r\npost_id = graph_handler.PostVideoFeed(text=\"Check out this video!\", id=\"PAGE_OR_USER_ID\", access_token=\"ACCESS_TOKEN\", video_url=\"VIDEO_URL\")\r\n```\r\n### Posting Media (Text, Photos, or Videos)\r\n```python\r\n# Post text, photos, or videos to a user or page\r\nmedia_urls = [\"PHOTO_URL_1\", \"PHOTO_URL_2\"]\r\npost_id = graph_handler.PostToFacebook(text=\"My Facebook post\", media_urls=media_urls, access_token=\"ACCESS_TOKEN\", id=\"PAGE_OR_USER_ID\", isVideo=False)\r\n```\r\n## Documentation\r\nFor detailed documentation and more information about available methods and parameters, please refer to the <a href='https://github.com/Ambar-06/python-graph-handler'>official documentation</a>.\r\n\r\n## License\r\nThis project is licensed under the MIT License - see the LICENSE file for details.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Unofficial Facebook Graph API Handler",
    "version": "0.1.3",
    "project_urls": null,
    "split_keywords": [
        "python",
        "facebook",
        "graph api",
        "social media",
        "instagram",
        "meta",
        "meta api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb4639bf20549c72fb583957463b3890869ad675cba14856c4d682395e25d1bf",
                "md5": "8f94bce613b2919c5483a3a319b70351",
                "sha256": "adb2f0c8e7821dfef9fc4fd04fd28cf006e82784eca443ac1983ac74cd7be2db"
            },
            "downloads": -1,
            "filename": "GraphHandler-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8f94bce613b2919c5483a3a319b70351",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6443,
            "upload_time": "2023-11-18T07:33:08",
            "upload_time_iso_8601": "2023-11-18T07:33:08.727601Z",
            "url": "https://files.pythonhosted.org/packages/cb/46/39bf20549c72fb583957463b3890869ad675cba14856c4d682395e25d1bf/GraphHandler-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d22b4ea88ce9c155fa7c5c577f15d34e69c064021051856fa54c5a07cfb3c255",
                "md5": "1d0e706b4bcd4e004e93bde61fcc8858",
                "sha256": "edea931f2e40c59e5dcf239b39a932d0ff4d34075f1f90afd11d5c193dabf278"
            },
            "downloads": -1,
            "filename": "GraphHandler-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1d0e706b4bcd4e004e93bde61fcc8858",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6283,
            "upload_time": "2023-11-18T07:33:10",
            "upload_time_iso_8601": "2023-11-18T07:33:10.473478Z",
            "url": "https://files.pythonhosted.org/packages/d2/2b/4ea88ce9c155fa7c5c577f15d34e69c064021051856fa54c5a07cfb3c255/GraphHandler-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-18 07:33:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "graphhandler"
}
        
Elapsed time: 3.16998s