public void Save(ISocialNetwork network)
		{
			var pandas = network.GetAllPandas();

			WritePandas(pandas, "PandaNetwork.pandanet");
			WriteConnections(pandas, "PandaNetworkConnections.pandanetconn");
		}
        //CREDENTIAL

        //Stage created for Fajardo

        //Stage created for Fajardo
        private void SetupStage1()
        {
            facebook = new Facebook();


            IList <string> words = new List <String>()
            {
                "Fajardo",
                "Sergio Fajardo"
            };

            configuration = new QueryConfiguration()
            {
                Keywords            = words,
                Location            = Locations.Colombia,
                Language            = Languages.Spanish,
                Filter              = Filters.None,
                SearchType          = SearchTypes.Mixed,
                SinceDate           = new DateTime(2018, 01, 01),
                UntilDate           = DateTime.Now.AddDays(1),
                MaxPublicationCount = 100
            };
            IList <IPublication> found = facebook.Search(configuration);

            if (found.Count > 0)
            {
                publication = found[0];
            }
        }
예제 #3
0
        public void SetupStage3()
        {
            twitter = new Twitter();


            IList <string> words = new List <String>()
            {
                "Petro",
            };

            configuration = new QueryConfiguration()
            {
                Keywords            = words,
                Location            = Locations.Colombia,
                Language            = Languages.Spanish,
                Filter              = Filters.None,
                SearchType          = SearchTypes.Mixed,
                SinceDate           = new DateTime(2018, 01, 01),
                UntilDate           = DateTime.Now.AddDays(1),
                MaxPublicationCount = 10
            };

            IList <IPublication> found = twitter.Search(configuration);

            if (found.Count > 0)
            {
                publication = found[0];
            }
        }
        //for project facebook's group
        public void SetupStage3()
        {
            facebook = new Facebook();

            IList <string> words = new List <String>()
            {
                "Uribe",
                "Uribe Velez"
            };

            //[ ]+Petro[ ,.]{}
            //

            configuration = new QueryConfiguration()
            {
                Keywords            = words,
                Location            = Locations.Colombia,
                Language            = Languages.Spanish,
                Filter              = Filters.None,
                SearchType          = SearchTypes.Mixed,
                SinceDate           = new DateTime(2018, 01, 01),
                UntilDate           = DateTime.Now.AddDays(1),
                MaxPublicationCount = 200
            };

            IList <IPublication> found = facebook.Search(configuration);

            if (found.Count > 0)
            {
                publication = found[0];
            }
        }
예제 #5
0
        public void SetupStage3()
        {
            twitter = new Twitter();
            string consumerKey    = System.Configuration.ConfigurationManager.AppSettings["consumerKey"];
            string consumerSecret = System.Configuration.ConfigurationManager.AppSettings["consumerSecret"];;
            string accessToken    = System.Configuration.ConfigurationManager.AppSettings["accessToken"];
            string secretToken    = System.Configuration.ConfigurationManager.AppSettings["secretToken"];

            Tweetinvi.Auth.SetUserCredentials(consumerKey, consumerSecret, accessToken, secretToken);

            IList <string> words = new List <String>()
            {
                "Petro",
            };

            configuration = new QueryConfiguration()
            {
                Keywords            = words,
                Location            = Locations.Colombia,
                Language            = Languages.Spanish,
                Filter              = Filters.None,
                SearchType          = SearchTypes.Mixed,
                SinceDate           = new DateTime(2018, 01, 01),
                UntilDate           = DateTime.Now.AddDays(1),
                MaxPublicationCount = 10
            };

            IList <IPublication> found = twitter.Search(configuration);

            if (found.Count > 0)
            {
                publication = found[0];
            }
        }
        // Test facebook page RealidadPoliticaColombiana
        private void SetupStage4()
        {
            facebook = new Facebook();

            IList <string> words = new List <String>()
            {
                "gallup",
            };

            configuration = new QueryConfiguration()
            {
                Keywords            = words,
                Location            = Locations.USA,
                Language            = Languages.English,
                Filter              = Filters.None,
                SearchType          = SearchTypes.Mixed,
                SinceDate           = new DateTime(2018, 03, 18),
                UntilDate           = DateTime.Now.AddDays(1),
                MaxPublicationCount = 40
            };

            IList <IPublication> found = facebook.Search(configuration);

            if (found.Count > 0)
            {
                publication = found[0];
            }
        }
예제 #7
0
        private void ConnectNewWork(ListViewItem lvi)
        {
            ISocialNetwork netWork = (ISocialNetwork)lvi.Tag;

            CountConnectedNetWorks += netWork.Autorization() ? 1 : 0;
            lvi.SubItems[1].Text    = netWork.IsAuthorized.ToString();
            lvi.ForeColor           = netWork.IsAuthorized ? Color.Green : Color.Red;
        }
예제 #8
0
 public SocialNetworkProvider(Dht dht, SocialUser user)
 {
     _local_user = user;
     _dht        = dht;
     _provider   = _drupal;
     _network    = _drupal;
     _drupal     = new DrupalNetwork(user);
     _online     = false;
 }
예제 #9
0
 public SocialNetworkProvider(Dht dht, SocialUser user)
 {
     _local_user = user;
       _dht = dht;
       _provider = _drupal;
       _network = _drupal;
       _drupal = new DrupalNetwork(user);
       _online = false;
 }
		private static void LoadPandas(ISocialNetwork network, string filename)
		{
			var serializer = new JavaScriptSerializer();
			var jsonString = File.ReadAllText(filename);
			var deserializedResult = serializer.Deserialize<IEnumerable<PandaDTO>>(jsonString).Select(PandaDTO.ConvertToPanda);

			foreach(var panda in deserializedResult)
			{
				network.AddPanda(panda);
			}
		}
예제 #11
0
        public MainPageViewModel()
        {
            _fbSocialNetwork = ViewModelLocator.GetContainer().Resolve <ISocialNetwork>();

            LoginCommand = new RelayCommand(Login);

            LogoutCommand = new RelayCommand(Logout);

            GetFriendsCommand = new RelayCommand(GetFriends);

            GetMusicCommand = new RelayCommand(GetMusic);
        }
예제 #12
0
        public MainPageViewModel()
        {
            _VkSocialNetwork = ViewModelLocator.GetContainer().Resolve <ISocialNetwork>();

            LoginCommand = new RelayCommand(Login);

            LogoutCommand = new RelayCommand(Logout);

            GetFriendsCommand = new RelayCommand(GetFriends);

            GetFriendsRankCommand = new RelayCommand(GetFriendsRank);

            GetPopularMusicCommand = new RelayCommand(GetPopularMusic);

            GetReccomendedMusicCommand = new RelayCommand(GetReccomendedMusic);
        }
예제 #13
0
 /**
  * Constructor.
  * @param node the social node.
  * @param provider the identity provider.
  * @param network the social network.
  * @param port the port number for the HTTP interface.
  * @param srh the social rpc handler.
  */
 public SocialConnectionManager(SocialNode node, IProvider provider,
                                ISocialNetwork network, string port,
                                Dictionary <string, SocialUser> friends,
                                SocialRpcHandler srh)
 {
     _snode              = node;
     _provider           = provider;
     _network            = network;
     _friendlist         = new List <string>();
     _friends            = friends;
     _http               = new HttpInterface(port);
     _http.ProcessEvent += ProcessHandler;
     _http.Start();
     _srh            = srh;
     _srh.SyncEvent += SyncHandler;
     _timer_thread   = new Timer(new TimerCallback(TimerHandler), null,
                                 STARTTIME, INTERVALTIME);
 }
예제 #14
0
        public SpamApplication(SocialNetworkBrand type)
        {
            switch (type)
            {
            case SocialNetworkBrand.Facebook:
                _network = new Facebook();
                break;

            case SocialNetworkBrand.LinkedIn:
                break;

            case SocialNetworkBrand.Twitter:
                break;

            default:
                break;
            }
            _spammer = new Spammer();
        }
예제 #15
0
 /**
  * Constructor.
  * @param node the social node.
  * @param provider the identity provider.
  * @param network the social network.
  * @param port the port number for the HTTP interface.
  * @param srh the social rpc handler.
  */
 public SocialConnectionManager(SocialNode node, IProvider provider,
                            ISocialNetwork network, string port,
                            Dictionary<string, SocialUser> friends,
                            SocialRpcHandler srh)
 {
     _snode = node;
       _provider = provider;
       _network = network;
       _friendlist = new List<string>();
       _friends = friends;
       _http = new HttpInterface(port);
       _http.ProcessEvent += ProcessHandler;
       _http.Start();
       _srh = srh;
       _srh.SyncEvent += SyncHandler;
       _timer_thread = new Timer(new TimerCallback(TimerHandler), null,
                         STARTTIME, INTERVALTIME);
 }
예제 #16
0
 void Awake()
 {
     facebook = new FacebookHandler();
 }
예제 #17
0
 public Application()
 {
     _socialNetwork = new Facebook();
 }
예제 #18
0
 public void Register(string name, ISocialNetwork network)
 {
     _networks = _networks.InsertIntoNew(name, network);
 }
예제 #19
0
 public Application(ISocialNetwork network, SocialSpammer spammer)
 {
     _network = network;
     _spammer = spammer;
 }
 public void Register(string name, ISocialNetwork network) {
   _networks = _networks.InsertIntoNew(name, network);
 }
예제 #21
0
 public VariantAssetConfig AddSocialNetwork(ISocialNetwork socialNetwork)
 {
     _socialNetworks.Add(socialNetwork);
     return(this);
 }