diff --git a/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.json b/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.json index beeca77f..690e10a9 100644 --- a/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.json +++ b/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.json @@ -31,6 +31,14 @@ "type": "STRING", "mandatory" : true }, + { + "name": "screen_name", + "label" : "Twitter Screen Name", + "description" : "Name of the Twitter User", + "type": "STRING", + "mandatory" : true + }, + //{ "type" : "SEPARATOR", "label" : "Advanced" }, { "name": "dataiku_url", diff --git a/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.py b/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.py index 59f70538..07b5f296 100644 --- a/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.py +++ b/twitter-tools/custom-recipes/sonra_twitter_plugin_compute_followers_info/recipe.py @@ -19,6 +19,7 @@ output_dataset_name = get_output_names_for_role('main')[0] client = get_client() DEFAULT_INTERVAL=int(get_recipe_config()['default_interval']) +SCREEN_NAME=get_recipe_config()['screen_name'] def get_followers(): # get followers @@ -29,7 +30,7 @@ def get_followers(): try: # get followers print "Get followers list: "+str(cursor) - response = client.api.followers.ids.get() + response = client.api.followers.ids.get(screen_name = SCREEN_NAME, cursor = cursor) # update cursor cursor = response.data.next_cursor