--- title: Title keywords: fastai sidebar: home_sidebar nb_path: "nbs/TwitterImporter.ipynb" ---
Full importer run method
Add your authentication credentials from your twitter developer account
Client credentials:
App Key === API Key === Consumer API Key === Consumer Key === Customer Key === oauth_consumer_key
App Key Secret === API Secret Key === Consumer Secret === Consumer Key === Customer Key === oauth_consumer_secret
Callback URL === oauth_callback
Token credentials:
Access token === Token === resulting oauth_token
Access token secret === Token Secret === resulting oauth_token_secret
Set up importer instance, with the token and user handle
Instatiate the pod
client.test_connection()
Add data schema to pod
client = PodClient()
# Add schemas
user_item = User(1, "name", "screen_name", "location", "profile_location", "description", "url", "entities", "protected", 1, 1, 1, "created_at", 1, "utc_offset", "time_zone", "geo_enabled", "False", 30, "lang", "status", "False", "False", "True", "Yellow", "profile_background_image_url", "profile_background_image_url_https", "profile_background_tile", "profile_image_url", "profile_image_url_https", "profile_link_color", "profile_sidebar_border_color", "profile_sidebar_fill_color", "profile_text_color", "True", "False", "True", "False", "True", "True", "True", "translator_type", "withheld_in_countries")
client.add_to_schema(user_item);
tweet_item = Tweet.from_data("created_at", 1363430961812283392, 835191402, "full_text", "False", "displayRextRange", "entities", "source", "None", "None", "None", "None", "None", "user", "None", "None", "None", "None", "False", 20, 10, "True", "True", "lang")
client.add_to_schema(tweet_item);
contact = Contact(1335859528886349824, 835191402, "name", "screenName", "location","description", "url", "entities", "protected", 8, 9, 0, "twitterDateCreated", 1, "utcOffset","timeZone","True", "False", 6, "lang", "status", "contributorsEnabled", "isTranslator","isTranslationEnabled", "profileBackgroundColor","profileBackgroundImageUrl", "profileBackgroundImageUrlHttps","profileBackgroundTile", "profileImageUrl", "profileImageUrlHttps", "profileLinkColor","profileSidebarBorderColor", "profileSidebarFillColor", "profileTextColor", "profileUseBackgroundImage", "hasExtendedProfile","defaultProfile", "defaultProfileImage", "following", "liveFollowing","followRequestSent", "notifications", "muting", "blocking", "blockedBy","translatorType", "withheldInCountries", "Follower")
client.add_to_schema(contact);
Run importer. Include your preferred username e.g "elonmusk"