Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,11 @@ enable=anomalous-backslash-in-string,
no-write-in-compute,
# messages that do not cause the lint step to fail
consider-merging-classes-inherited,
create-user-wo-reset-password,
dangerous-filter-wo-user,
deprecated-module,
file-not-used,
invalid-commit,
missing-manifest-dependency,
missing-newline-extrafiles,
missing-readme,
no-utf8-coding-comment,
odoo-addons-relative-import,
old-api7-method-defined,
redefined-builtin,
too-complex,
unnecessary-utf8-coding-comment,
manifest-external-assets


Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# generated from manifests external_dependencies
tweepy
317 changes: 317 additions & 0 deletions social_media_x/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==============
Social Media X
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dce4cef08fdfe08eb3cbdc63e90942bd6f44b8b7090045d2fef34b660c0b71d5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/19.0/social_media_x
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-19-0/social-19-0-social_media_x
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides the necessary functionality for basic interaction
with the X social network.

Main features:

- User account integration.
- Post creation.
- Post reactions (likes, comments).
- Comment reactions (likes)
- Reports and graphs with agnostic metrics.

Statistics account
------------------

In the case of X statistics, only current posts are taken into account;
if some are deleted, the metrics also decrease, that is, it is not a
history of the account's posts.

1. The eye icon: Total number of views, which may include multiple views
by the same user.

2. The hand icon: means the impressions (likes, comments, shares,
retweets, quote_count) of current posts.

3. The star icon: means the value of the engagement of the publications,
it is a calculation similar to interactions / (impressions \* 100).

|STATISTICS_ACCOUNT|

.. |STATISTICS_ACCOUNT| image:: https://raw.githubusercontent.com/social_media_linkedin/static/img/readme/STATISTICS_ACCOUNT.png

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to:
--------------------------------------

Please note that you must have a developer account. The steps required
for using it are defined below:

- Go to https://developer.twitter.com/en/portal/dashboard

- Create a developer account.

- Once the account is created, go to Projects and APPS -> Default
Project and select it.

|PROJECT_DEFAULT|

- Then scroll to the bottom of the page and press the Edit button.

|CONFIGURATION_ACCOUNT|

- Once on the page, in the App Permissions section, select the Read and
Write and Direct Messages.

|APP_PERMISIONS|

- Go to the App Type section and select Web App, Automated App or Bot.

|TYPE_APP|

- Then, in the Callback URI / Redirect URL section, add a new address.
Here are the steps to get that URL in Odoo:

- Go to *Configuration* > *Technical* > System Parameters.
- Search for web.base.url
- Copy the base URL and concatenate it with the endpoint. Example:
web.base.url: http://192.168.1.7:8017 endpoint: /social_x/callback
(this value is fixed) linkedin_url:
http://192.168.1.7:8017/social_x/callback

|PROJECT_DEFAULT|

- Then go to the Website URL section and add your X profile address.

Example: https://x.com/AccountTest

|PROJECT_DEFAULT|

- Finally, go to Projects and APPS -> Default Project -> Keys and
Tokens, press the Regenerate button, and then in the window that
appears, confirm the generation of the API Key and API Key Secret
values.

|KEYS_AND_TOKENS|

|GENERATE_NEW_KEY_SECRET|

Learn more at `X Developer Portal <https://developer.twitter.com>`__

Registering the API Key and API Key Secret. Integration of a user account.
--------------------------------------------------------------------------

- Go to *Social Media* > Settings > Social Media

- Click on the *Associate Account* button for the desired social
network.

|ASSOCIATE_ACCOUNT|

-

- A wizard will open for you to add the API Key and API Key Secret
obtained from your developer account.

|WIZARD_ASSOCIATE_ACCOUNT|

- By clicking the *Associate* button here, you'll be taken to a X
authentication page. Once you validate your information, you'll be
taken to the system and the Dashboard view, where you'll see your
posts.

|AUTHORIZE_ACCOUNT|

- Once you have completed these steps and everything is working
correctly, you can see your account in *Social Media* > Configuration
> Accounts

.. |PROJECT_DEFAULT| image:: https://raw.githubusercontent.com/social_media_x/static/img/readme/PROJECT_DEFAULT.png
.. |CONFIGURATION_ACCOUNT| image:: https://raw.githubusercontent.com/social_media_x/static/img/readme/CONFIGURATION_ACCOUNT.png
.. |APP_PERMISIONS| image:: https://raw.githubusercontent.com/social_media_x/static/img/readme/APP_PERMISIONS.png
.. |TYPE_APP| image:: https://raw.githubusercontent.com/social_media_x/static/img/readme/TYPE_APP.png
.. |KEYS_AND_TOKENS| image:: https://raw.githubusercontent.com/social_media_x/static/img/readme/KEYS_AND_TOKENS.png
.. |GENERATE_NEW_KEY_SECRET| image:: https://raw.githubusercontent.com/social_media_x/static/img/readme/GENERATE_NEW_KEY_SECRET.png
.. |ASSOCIATE_ACCOUNT| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_x/static/img/readme/ASSOCIATE_ACCOUNT.png
.. |WIZARD_ASSOCIATE_ACCOUNT| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_x/static/img/readme/WIZARD_ASSOCIATE_ACCOUNT.png
.. |AUTHORIZE_ACCOUNT| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_x/static/img/readme/AUTHORIZE_ACCOUNT.png

Usage
=====

List of posts generated from Odoo.
----------------------------------

Only posts generated using Odoo are displayed.

- Go to *Social Media* > Post

Generate a post.
----------------

This feature acts as a template for generating multiple posts from a
single view, depending on the selected accounts.

- Go to *Social Media* > Post > New or Go to *Social Media* > Dashboard
> Add Post
- Fill in the required fields |CREATE_POST|
- Save
- Click on the *Post* button

Update token, client ID, client Secret and organization data
------------------------------------------------------------

- Go to *Social Media* > Configuration > Accounts

- Select the account

- Click on the *Update account* button

|BUTTON_UPDATE_ACCOUNT|

- In the wizard that appears, if none of the checkboxes are selected and
the *Update* button is pressed, the system will update only the
organization's data.

- If the *Update keys* checkbox is selected, the current Client ID and
Client Secret values will be displayed by default. Modify any of these
values and authentication will be performed again through LinkedIn to
update these values and the token.

|UPDATE_KEYS|

- Selecting the *Update token* checkbox will update the current token.

|UPDATE_TOKEN|

Archive Account X
-----------------

- Go to *Social Media* > Configuration > Accounts

- Select the account

- Click on the *Delete account* button

|ARCHIVE_ACCOUNT|

- Please note that all data associated with this account will be
archived.

Enable since
------------

- Go to *Social Media* > Configuration > Accounts

- Select the account

- Select *Enable since*

- The *Post since* field is then enabled, allowing you to select the
post to start the search for in the next post retrieval. Note that
metrics for older posts will not be updated if this option is
selected.

|ENABLE_SINCE|

.. |CREATE_POST| image:: https://raw.githubusercontent.com/social_media_x/static/img/readme/CREATE_POST.png
.. |BUTTON_UPDATE_ACCOUNT| image:: https://raw.githubusercontent.com/social_media_linkedin/static/img/readme/BUTTON_UPDATE_ACCOUNT.png
.. |UPDATE_KEYS| image:: https://raw.githubusercontent.com/social_media_linkedin/static/img/readme/UPDATE_KEYS.png
.. |UPDATE_TOKEN| image:: https://raw.githubusercontent.com/social_media_linkedin/static/img/readme/UPDATE_TOKEN.png
.. |ARCHIVE_ACCOUNT| image:: https://raw.githubusercontent.com/social_media_linkedin/static/img/readme/ARCHIVE_ACCOUNT.png
.. |ENABLE_SINCE| image:: https://raw.githubusercontent.com/social_media_linkedin/static/img/readme/ENABLE_SINCE.png

Known issues / Roadmap
======================

- The free X developer account has significant limitations on post
retrievals, writing, comments, likes, etc.

- For more information, visit this link:
https://developer.x.com/en/portal/products
- The action of giving like or followers is not enabled in the free
version:
https://devcommunity.x.com/t/update-to-x-api-free-tier-removal-of-like-and-follow-endpoints/247646
- Rate limits according to plan:
https://docs.x.com/x-api/fundamentals/rate-limits
- Frequently asked: https://developer.x.com/en/support/x-api/v2

- Also keep in mind that if you want to post the same content on the
same accounts (username X), the API will not allow it for spam
reasons.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20social_media_x%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* BinhexTeam

Contributors
------------

- [Binhex] (https://www.binhex.cloud):

- Edilio Escalona Almira [email protected]

- [Trobz] (https://trobz.com/):

- Khanh (Dinh Van) [email protected]

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/social <https://github.com/OCA/social/tree/19.0/social_media_x>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
7 changes: 7 additions & 0 deletions social_media_x/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


from . import controllers
from . import models
from . import wizards
33 changes: 33 additions & 0 deletions social_media_x/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Social Media X",
"summary": """Integration of the X social network.""",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "BinhexTeam,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"depends": [
"social_media_base",
],
"data": [
"data/social_media_data.xml",
"views/social_account_views.xml",
"wizards/wizard_social_account.xml",
],
"assets": {
"web.assets_backend": [
# SERVICES
"social_media_x/static/src/js/services/**/*.js",
# KANBAN
"social_media_x/static/src/js/views/**/*.js",
],
},
"external_dependencies": {
"python": [
"tweepy",
],
},
"exclude": ["social"],
}
1 change: 1 addition & 0 deletions social_media_x/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import social_media_x
Loading
Loading