Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from ReenigneArcher/nightly
Browse files Browse the repository at this point in the history
Update facebook_post_action.py
  • Loading branch information
ReenigneArcher authored Jan 29, 2022
2 parents c3e5d61 + 6af7952 commit e94a4a3
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions facebook_post_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,11 @@

from utils import s

inputs = [
'ACCESS_TOKEN',
'MESSAGE',
'PAGE_ID',
'URL'
]

# get the input values
for key in inputs:
try:
globals()[key] = os.environ['INPUT_%s' % key] or os.environ[key]
except KeyError:
print('%s input has not been set.' % key)
x = None
# inputs
ACCESS_TOKEN = os.environ['INPUT_ACCESS_TOKEN']
MESSAGE = os.environ['INPUT_MESSAGE']
PAGE_ID = os.environ['INPUT_PAGE_ID']
URL = os.getenv('INPUT_URL', None)

FACEBOOK_API_END = 'https://graph.facebook.com/{0}/feed'.format(PAGE_ID)

Expand All @@ -37,7 +28,6 @@
data=s(urlencode(FACEBOOK_API_DATA)))

while True:

RESULT = json.loads(urlopen(HTTP_REQUEST).read())

if 'error' not in RESULT:
Expand Down

0 comments on commit e94a4a3

Please sign in to comment.