2009-12-16 3 views
1

방금 ​​트위터 소셜 그래프를 분석하기위한 미친 아이디어를 얻었습니다 (예 : 팔로우 관계를 그래프의 가장자리로 표시). 흥미롭게도 Twitter API은 그래프를 생성하는 방법을 제공합니다. Twitter는 매우 역동적 인 네트워크 인 반면 소셜 그래프의 정적 스냅 샷은 읽을 수 있습니다. 그래프를 동적으로 업데이트 할 수 있다면 좋을 것입니다. 그래서 내 질문은 : 누군가가 시작하거나 중지 할 때 트위터에 의해 통지를받을 수있는 방법이 있습니까?Twitter 소셜 그래프에 대한 업데이트를받는 방법은 무엇입니까?

답변

2

내가 링크 된 문서에서 분명히 언급 할 것입니다.

나는 자신의 추종자 목록 검사를 수행하고 결과를 정기적으로 비교해야한다는 것을 확신합니다. 누군가 여부와 얼마나 많은 추종자들은이 날 따라 경우

0

나는이 작업을 수행하고 난 pchart를 사용하는 차트 생성이 차트

public function existsFriendship($username,$friend) 
    { 
    try 
    { 
     if ($this->twitter->existsFriendship($username, $friend)) 
     return true; 
    } 
    catch(Exception $e) 
    { 
     $this->debug($e->getMessage()); 
    } 

    } 

를 생성합니다.

in smarty template the code looks like this; 

include("pChart/pData.class"); 
include("pChart/pChart.class"); ![alt text][1] 
// Initialise the graph 
$Test = new pChart(700,230); 
$Test->setFontProperties("Fonts/tahoma.ttf",13); 
$Test->setGraphArea(40,30,680,200); 
$Test->drawGraphArea(252,252,252,TRUE); 
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2); 
$Test->drawGrid(4,TRUE,230,230,230,70); 

// Draw the line graph 
$Test->drawLineGraph($DataSet->GetData(),$DataSet->GetDataDescription()); 
$Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),3,2,255,255,255); 

// Finish the graph 
$Test->setFontProperties("Fonts/tahoma.ttf",12); 
$Test->drawLegend(45,35,$DataSet->GetDataDescription(),255,255,255); 
$Test->setFontProperties("Fonts/tahoma.ttf",12); 
$Test->drawTitle(60,22,"Twitter Graph",50,50,50,585); 

$example = $Test->Render("templates/example1.png"); 
$smarty->assign("example",$example); 
$smarty->display('index.tpl'); 

마침내 결과 alt text http://img691.imageshack.us/img691/6749/example1k.png

관련 문제