글
IT 2010/03/02 14:18SNS와 컨텐츠 유통을 쉽게하려면?
참고 : 유용한 컨텐츠 픽업하고, 트위터 친구들과 나누려면?
같은 서비스 입니다.
- IE : 1. IE 에서는 도구 추가를 마우스 오른쪽으로 선택
- IE : 2. 보안경고
- IE : 3. 즐겨찾기 추가 창에서 이름과 위치(즐겨찾기 모음)으로 설정 후 저장
- Crome(크롬) : 크롬에서는 도구추가 항목을 마우스로 북마트 항목에 끌여다 놓기 하면 됩니다.
- 크롬에서 북마크 항목을 볼려면 Ctrl-B를 선택하면 나타납니다.
- FireFox(파이어폭스, 불여우) : 크롬과 같습니다.
* 트위터에 현재페이지 short url과 함께 내 글 보내기
'IT' 카테고리의 다른 글
| SNS 트위터와 취업 그리고 사람의 인지한계 (1) | 2010/03/08 |
|---|---|
| SNS와 컨텐츠 유통을 쉽게하려면? (0) | 2010/03/02 |
| python editplus 설정 (0) | 2008/04/14 |
| 개발시 유용한 사이트 (0) | 2007/04/03 |
트랙백
댓글
글
IT/Tech 2010/02/19 19:48me2day api PHP
me2day api
me2day api를 사용해서 서비스를 개발해야 된다. 으윽 머리아파
일단 관련 자료를 URL로 정리해보겠습니다.

미투데이
미투데이 APP
me2day api를 사용해서 서비스를 개발해야 된다. 으윽 머리아파
일단 관련 자료를 URL로 정리해보겠습니다.

이미지출처 : ayukawa.80port.net
미투데이
미투데이 APP
me2py 공개 (python module for me2day open API)
me2day php API 소스
위의 자료를 바탕으로 테스트를 위한 코드를 만들었습니다.
[code php]
class Me2api {
public $user_id = null;
public $user_key = null;
public $format = 'xml';
private $api_url = 'http://me2day.net:80';
private $application_key = '';
public function Me2api(){
}
public function _getNonce(){
$nonce = '';
for($i=0; $i<8; $i++) $nonce .= dechex(mt_rand(0,15));
//for($i=0; $i<8; $i++) $nonce .= dechex(rand(0,15));
return $nonce;
}
public function _getAuthKey(){
$nonce = $this->_getNonce();
return $nonce.md5($nonce.$this->user_key);
}
public function _getPath($method, $user_id=nll){
return ($user_id)?
sprintf('/api/%s.'.$this->format, $method):
sprintf('/api/%s/%s.'.$this->format, $method, $this->user_id);
}
public function _get_me2day($method, $user_id=null, $params=null){
$url = $this->api_url.$this->_getPath($method, $user_id);
$auth = base64_encode($this->user_id.':'.$this->_getAuthKey());
$arr_content = array();
if(is_array($params) && count($params)) {
foreach($params as $key => $val) {
$arr_content[] = sprintf('%s=%s', $key, urlencode($val));
}
$body = implode('&',$arr_content);
}
$url .= '?'.$body;
$file = fopen ($url, "r");
if (!$file) {
echo "<p>Unable to open remote file.\n";
exit;
}
$buff = '';
while (!feof ($file)) $buff .= fgets ($file, 1024);
fclose($file);
return $buff;
}
}
class me2{
public $var = Array(
'user_id' => null;
'user_key' => null;
);
public function m2(){
$this->var = (object)$this->var;
$me2api = new Me2api;
$content = $this->me2api->_getContent('get_latests', $this->var->user_id, Array('content_type'=>'document'));
print_r($content);
}
}
[/code]
일단 코드 전체를 타이핑하기 귀찮아서(텍스트큐브 코드 라이브러리와 글쓰기 에디터 화면은 같이 사용하기가...) 이만큼만 적고 담에 또 추가 하겠습니다.
볼만한건 없지만... 되도록 하루에 하나씩 포스팅을 하기 위해서 노력중입니다. ^^
me2day php API 소스
위의 자료를 바탕으로 테스트를 위한 코드를 만들었습니다.
[code php]
class Me2api {
public $user_id = null;
public $user_key = null;
public $format = 'xml';
private $api_url = 'http://me2day.net:80';
private $application_key = '';
public function Me2api(){
}
public function _getNonce(){
$nonce = '';
for($i=0; $i<8; $i++) $nonce .= dechex(mt_rand(0,15));
//for($i=0; $i<8; $i++) $nonce .= dechex(rand(0,15));
return $nonce;
}
public function _getAuthKey(){
$nonce = $this->_getNonce();
return $nonce.md5($nonce.$this->user_key);
}
public function _getPath($method, $user_id=nll){
return ($user_id)?
sprintf('/api/%s.'.$this->format, $method):
sprintf('/api/%s/%s.'.$this->format, $method, $this->user_id);
}
public function _get_me2day($method, $user_id=null, $params=null){
$url = $this->api_url.$this->_getPath($method, $user_id);
$auth = base64_encode($this->user_id.':'.$this->_getAuthKey());
$arr_content = array();
if(is_array($params) && count($params)) {
foreach($params as $key => $val) {
$arr_content[] = sprintf('%s=%s', $key, urlencode($val));
}
$body = implode('&',$arr_content);
}
$url .= '?'.$body;
$file = fopen ($url, "r");
if (!$file) {
echo "<p>Unable to open remote file.\n";
exit;
}
$buff = '';
while (!feof ($file)) $buff .= fgets ($file, 1024);
fclose($file);
return $buff;
}
}
class me2{
public $var = Array(
'user_id' => null;
'user_key' => null;
);
public function m2(){
$this->var = (object)$this->var;
$me2api = new Me2api;
$content = $this->me2api->_getContent('get_latests', $this->var->user_id, Array('content_type'=>'document'));
print_r($content);
}
}
[/code]
일단 코드 전체를 타이핑하기 귀찮아서(텍스트큐브 코드 라이브러리와 글쓰기 에디터 화면은 같이 사용하기가...) 이만큼만 적고 담에 또 추가 하겠습니다.
볼만한건 없지만... 되도록 하루에 하나씩 포스팅을 하기 위해서 노력중입니다. ^^
'IT > Tech' 카테고리의 다른 글
| naver.com 나눔글꼴 설치 (0) | 2010/04/02 |
|---|---|
| javascript object 값 출력 (2) | 2010/03/10 |
| me2day api PHP (7) | 2010/02/19 |
| PHP 성능튜닝 IF & Switch 문법 (0) | 2010/01/28 |
| 프로그램에서 메일수신확인 방법 (0) | 2010/01/04 |
| mypicup textcube용 위젯 스크립트 (0) | 2009/12/30 |
RECENT COMMENT