tweepy on Macbook PyCharm — "async" invalid syntax

I’m fairly new to coding, so I’m not quite sure what to do. I’m using a MacBook and downloaded PyCharm for my coding class, and so far, I’ve been able to figure most things out, but I’m stuck on this one.

I’m trying to get the tweepy Stream Listener to return the tweets for a certain hashtag, and this code worked without issue on the Windows computers on campus.
The code I’m running looks like this:

import tweepy
#override tweepy.StreamListener to add logic to on_status
class MyStreamListener(tweepy.StreamListener):

    def on_status(self, status):

    def on_error(self, status_code):
        if status_code == 420:
            # returning False in on_data disconnects the stream
            return False
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

myStreamListener = MyStreamListener()
myStream = tweepy.Stream(auth, listener=myStreamListener)


read more

Authorization header not working in fetch – React Native

I am making a request to an API that I have on my computer ( with react native from my phone (in the same network):

fetch('', {
  method: 'GET',
  headers: { 'Authorization': 'Bearer 4uFPmkP5326DXcRuHDKjRRrmhdeIBJ'},
  credentials: 'same-origin'
  .then((response) => response.json())
  .then((responseJson) => {
    console.log('RESPONSE: ' + JSON.stringify(responseJson))

But I am sniffing the request and it has not the Authorization header (any other that I put will appear, but not Authorization). In Xcode I have enabled ‘AllowArbitraryLoads’. So my API returns 401 (Unauthorized) because obviously there is no Authorization header. Why is it not included in my request?

read more

What is social marketing? SEO blog provides tips, tricks, and advice for improving websites and doing better search, social, content, and brand digital marketing 2017