social-network-friendship

rotate a tripartite network graph

谁说胖子不能爱 提交于 2019-12-11 15:13:27
问题 I'm using a tripartite graph to visualize the overlapping club memberships among selected students in a given class, but since the output looks quite "long," I am wondering if there's a way to rotate this graph to put "Class" on top, the more numerous "Club" layer in the middle, and the "student" layer on the bottom? Below is my code for this. It will be really appreciated if someone could share their thoughts on this. require(igraph) df <- read.csv2(text="Class;Club;Student Class;Club 1

user has many :users, or must I use another way for a friend based social network?

走远了吗. 提交于 2019-12-08 01:38:58
问题 I'm creating a little social network in Rails, where people can add eachother as a friend. I have created a model called 'user' , which contains, e-mail, strong md5 hash with salt of password etc. How do I create something like an option to add another user as a friend? Is it possible to have something like has_many_and_belongs_to :user in the user model? So a user has many users and belongs to many users. Or should I use another way, like adding a friendship model which has user1s_id:integer

facebook graph api..get friends of friends

萝らか妹 提交于 2019-11-30 09:01:13
I am using the FB graph api to get a list of my friends' friends using: https://graph.facebook.com/<id>/friends?access_token=<token> Now the weird thing is that this works for some of my friends and does not work for some others. Could somebody tell me why this is happening and a possible fix? In cases where it does not work, I get the following message: "Can't lookup all friends of YYYYYY. Can only lookup for the logged in user (XXXXX), or friends of the logged in user with the appropriate permission" And I repeat, I AM ABLE to get friend lists of some of my friends using the above URL. What

facebook graph api..get friends of friends

别来无恙 提交于 2019-11-29 12:27:14
问题 I am using the FB graph api to get a list of my friends' friends using: https://graph.facebook.com/<id>/friends?access_token=<token> Now the weird thing is that this works for some of my friends and does not work for some others. Could somebody tell me why this is happening and a possible fix? In cases where it does not work, I get the following message: "Can't lookup all friends of YYYYYY. Can only lookup for the logged in user (XXXXX), or friends of the logged in user with the appropriate