페이스북 피드 연동(ixRolling)이 얼마전부터 작동을 안합니다. 채택완료
ixRolling 페이스북 페이지 피드를 불러오는 기능을 잘 사용하고 있었는데,
그것을 사용하는 홈페이지들 전부 다 무한 로딩에 걸리고 글을 불러오지 못합니다.
제가 약 1~2달 전까지도 잘 사용을 했었는데 갑자기 어떤 사유인가요?
앱 등록과 관련이 있는가요? 최근 1~2달 사이에 앱 관련하여 페이스북 정책이 바뀌었는지..
혹시 기존 소스를 유지하고 수정해서 쓸 수 있는 방법이 있을까요?
바쁘시겠지만 조언이라도 부탁드립니다^^;
소스는 이러한 것을 쓰고 있었습니다.
index.php 파일
Copy
ix rolling jQuery(function() { jQuery('#ixr-example-1').ixRolling( {width: 189,height: 314}, [{service: 'facebook', userid: '490152801005812'}] ); });
js 파일
Copy
(function(c,e,g,a){c.extend(c.easing,{easeOutQuint:function(k,l,j,n,m){return n*((l=l/m-1)*l*l*l*l+1)+j},easeOutBounce:function(k,l,j,n,m){if((l/=m)1){j+=''+m.title+""}if(m.description){var l=m.description;if((m.icon==="facebook"||m.icon==="youtube")&&(this.options.msg_max_length>0&&l.length>this.options.msg_max_length)){l=l.substr(0,this.options.msg_max_length/2)+"..."}j+=''+l+""}if(this.options.show_row_menu&&m.row_menu){if(this.options.show_timer){m.row_menu.unshift(''+c.ixRolling.func.toTimer(m.timestamp)+"")}j+='';j+=m.row_menu.join(" · ");j+=""}else{if(this.options.show_timer){j+=''+c.ixRolling.func.toTimer(m.timestamp)+""}}j+="";return j}}};c.ixRolling=function(o,j,m){if(!(this instanceof c.ixRolling)){return new c.ixRolling(o,j,m)}if(typeof o!=="object"&&!o.jquery){o=c(o)}if(!o.jquery){c.error("elem wrong argument!")}if(o.length>1){o=c(o.get(0))}this.elem=c(o);this.uid=d.length;d[this.uid]=this;this.options=c.extend(true,{},c.ixRolling.defaultOptions,j||{});if(this.options.delay_sync0){t=this._items_buffer.pop();if(t.timestamp>l.prop("value")){l.removeClass("ixr-latest");m=this.item_to_html(t);q.removeClass("ixr-latest");q.addClass("ixr-remove-li");q=c(m).appendTo(this.ul);q.addClass("ixr-latest").hide();break}}}}else{if(q.hasClass("ixr-latest")){t=this._items_buffer.pop();if(t.timestamp>q.prop("value")){q.removeClass("ixr-latest");m=this.item_to_html(t);l.addClass("ixr-remove-li");q=c(m).appendTo(this.ul);q.addClass("ixr-latest").hide()}}}this.sync_count_span.html(this._items_buffer.length)}}if(n==="down"){r="+="+l.height();this.ul.animate({top:r},this.options.duration,this.options.easing,function(){p._slideComplete("down")})}else{if(n==="up"){l=l.next();r="-="+l.height();this.ul.animate({top:r},this.options.duration,this.options.easing,function(){p._slideComplete("up")})}}},hoverIn:function(){this._hover=true;if(this._inited){this.slideStop();this.showMoveBtn()}},hoverOut:function(){this._hover=false;if(this._inited){this.hideMoveBtn();this.slideStart(a,0.1)}},slideUp:function(){this.slide("up")},slideDown:function(){this.slide("down")},getSlideMode:function(j){if(j===a||(j!=="up"&&j!=="down")){j=this.options.slide_mode}return j},slideToggle:function(){if(!this._sliding){this.slideStop();this.options.slide_mode=this.options.slide_mode==="up"?"down":"up";this.slideStart(this.options.slide_mode,0)}},slideStart:function(k,j){if(!this._sliding){if(this.options.auto_slide&&!this._hover){if(j===a){j=this.options.delay_slide}this._slide_timeout=e.setTimeout(i?this.slide.bind(this):c.proxy(this.slide,this),j*1000)}}},slideStop:function(){if(this._slide_timeout){e.clearTimeout(this._slide_timeout);this._slide_timeout=null}},_slideComplete:function(j,k){if(!this._sliding){return}if(!k){var n=(j)?j:this.options.slide_mode;var m=this.ul.find("li:first");var l=this.ul.find("li:last");if(n==="down"){this.ul.css("top",-l.height());l.insertBefore(m);this.ul.find("li.ixr-remove-li").remove()}else{if(n==="up"){this.ul.css("top",-this.ul.find("li:first").next().height());m.insertAfter(l);this.ul.find("li.ixr-remove-li").remove()}}}this._sliding=false;this._updateTimer();this.slideStop();this.slideStart()},addService:function(k,j){if(h[k]){this._services.push(c.extend(true,{},h[k],j||{}))}return this},init:function(){if(!this._inited&&this._services.length>0){this._sync_timeout=e.setTimeout(i?this.sync.bind(this):c.proxy(this.sync,this),700*(this.uid));if((/MSIE ((5\.5)|6)/.test(navigator.userAgent)&&navigator.platform==="Win32")){this.footer.css("background","transparent")}}},header:function(){},_updateTimer:function(){var l=this.ul.get(0).getElementsByTagName("var"),n=l.length,j=c.ixRolling.func.now(),k=c.ixRolling.func.toTimer,m=0;for(;m0){this._syncComplete(true)}else{c.each(this._services,function(o,s){c.support.cors=true;var n,r="";var m=s.ajax.dataType;var q=s.ajax.type;var p=(j.options.cache&&s._cache!==false)||(!j.options.cache&&s._cache);if(p){n=c.ixRolling.func.ixr_path+"/cache.php";m="json";q="POST";r={provider:{service:s.service,ajax:s.ajax,url:s.get_url(p),delay_sync:j.options.delay_sync,key:s.keyword||s.id}}}else{n=s.get_url(p);r=s.ajax.data||{}}c.ajax({cache:false,url:n,type:q,data:r,async:false,timeout:2000,crossDomain:true,dataType:m,success:function(t){if(typeof t==="object"){j._items_buffer=j._items_buffer.concat(s.callback_data(t,j.options))}},error:function(t,u){},complete:function(){if(++l===k){j._syncComplete()}},statusCode:{400:function(){},404:function(){}}})})}},syncStop:function(){if(this._sync_state!=="stop"){this._syncTimerClear();this._sync_state="stop"}},syncToggle:function(){if(this.btn_sync.hasClass("ixr-btn-sync")){this.btn_sync.removeClass("ixr-btn-sync").addClass("ixr-btn-sync-stop");this.syncStop();this.sync_count_span.hide()}else{this.btn_sync.removeClass("ixr-btn-sync-stop").addClass("ixr-btn-sync");this.syncStart();this.sync_count_span.show()}},_syncTimerClear:function(){if(this._sync_timeout){e.clearTimeout(this._sync_timeout)}},syncStart:function(){this.syncStop();if(this._sync_state==="stop"){this.sync()}},_syncComplete:function(m){if(this._sync_state!=="start"){if(this._sync_timeout){e.clearTimeout(this._sync_timeout)}return}if(!m){this._items_buffer.sort(function(n,o){return parseInt((o.timestampn.timestamp)?1:0),10)});if(this._items_buffer.length>this.options.max_items){this._items_buffer=this._items_buffer.slice(0,this.options.max_items)}if(!this._inited){if(this._items_buffer.length>0){this.containers.show();var k,j="";while((k=this._items_buffer.shift())){j+=this.item_to_html(k)}var l=c(j).appendTo(this.ul).first().addClass("ixr-latest");this.ul.css("top",-l.height());delete this._items_buffer;this._items_buffer=[];this._inited=true;this.layout.css("background","none");if(!this.options.auto_sync){this.syncToggle()}if(this.options.auto_slide){this.slideStart()}}}this.sync_count_span.html(this._items_buffer.length);this.sync_count_span.removeClass("ixr-sync-count-start")}this._sync_state="stop";if(this.options.auto_sync){this._sync_timeout=e.setTimeout(i?this.sync.bind(this):c.proxy(this.sync,this),this.options.delay_sync*1000)}},destroy:function(){this.syncStop();this.slideStop();this._items_buffer=[];this.layout.find("*").removeData().remove();this.layout.remove();this.elem.removeData("ixRolling");d[this.uid]=null}};c.fn.ixRolling=function(l,k){if(typeof l==="object"){l=c.extend({},c.fn.ixRolling.defaultOptions,l||{})}else{var j=arguments}return this.each(function(){var n;var o=c(this);n=o.data("ixRolling");if(n@$2');m=m.replace(j,'$1#$2');return m}})(),cut_text:function(k,j){return k.substr(0,j/2)+"..."},strip_tags:function(j){return j.replace(/(]+)>)/ig,"")},timer_locale_langs:{en:["seconds ago","minutes ago","hours ago","days ago","weeks ago","months ago","years ago"],ko:["초전","분전","시간전","일전","주일전","개월전","년전"]},toTimer:(function(){return function(m,k){var l=c.ixRolling.func.timer_locale_langs[c.ixRolling.locale]||c.ixRolling.func.timer_locale_langs.en;if(!k){k=this.now()}var j=k-m;if(j59){j=~~(j/60);if(j>59){j=~~(j/60);if(j>23){j=~~(j/24);if(j>=7&&j30){return ~~(j/30)+l[5]}else{return j+l[3]}}}else{return j+l[2]}}else{return j+l[1]}}else{return j+l[0]}}})()};c.ixRolling.ServiceImpl={_keyword:null,_img_url:null,_cache:false,ajax:{type:"GET",dataType:"jsonp",data:{}},userid:null,keyword:null,since_id:null,url:null,count:10,service:null,target_str:"_blank",get_url:function(j){return""},callback_data:function(j,k){return[]},row_menu:function(){return[]}};c.ixRolling.TemplateImpl={tpl:"",item_to_html:function(j){return""}};c.ixRolling.addService=function(j,k){k.service=j;h[j]=c.extend(true,{},c.ixRolling.ServiceImpl,k);return this};c.ixRolling.hasService=function(j){return h[j]?true:false};c.ixRolling.newService=function(j){return c.extend(true,{},h[j])};c.ixRolling.addTemplate=function(j,k){f[j]=c.extend(true,{},c.ixRolling.TemplateImpl,k)}})(jQuery,window,document); (function(c,b,a,d){c.ixRolling.addService("facebook",{userid:"490152801005812",get_url:function(f){var e;if(this.keyword){e="https://graph.facebook.com/search?type=post&date_format=U&limit="+this.count+"&q="+escape(this.keyword)}else{e="http://www.facebook.com/feeds/page.php?format=rss20&date_format=U&id="+this.userid}if(!f&&this.since_id){e+="&since="+this.since_id}if(this.keyword){return e}else{return c.ixRolling.func.yql(e)}},callback_data:function(h){var g=[],f,i,l,e;if(typeof h!=="object"){return g}var k;var j;if(this.keyword){if(h.data){k=h.data;while((j=k.shift())){l=Number(j.created_time);if(this.last_timestamp>=j.created_time){continue}f=new Date();f.setTime(Number(j.created_time+"000"));i="http://graph.facebook.com/490152801005812/picture";if(j.picture){i=j.picture}g[g.length]={service:this.service,icon:"facebook",timestamp:l,date:f,title:"",description:(j.message||j.description||"").replace(c.ixRolling.func.strip_tag_regex," "),link:j.link||"https://www.facebook.com/"+j.id,img_url:i,author:{id:j.from.id,name:j.from.name,link:"http://www.facebook.com/profile.php?id="+j.from.id},row_menu:this.row_menu(j)}}}}else{if(h.query&&h.query.results&&h.query.results.item){k=h.query.results.item;while((j=k.shift())){f=new Date(j.pubDate);l=c.ixRolling.func.asTimestamp(f);if(this.last_timestamp>=l){continue}e=j.description.replace(c.ixRolling.func.strip_tag_regex," ");g[g.length]={service:this.service,timestamp:l,date:f,icon:"facebook",link:j.link,author:{name:j.author||j.creator},title:j.title,description:e,img_url:"http://graph.facebook.com/490152801005812/picture",row_menu:this.row_menu(j)}}}}if(g.length>0){this.since_id=g[0].timestamp;this.last_timestamp=g[0].timestamp}return g}})})(jQuery,window,document);
감사합니다.
즐거운 하루 되세요.
답변 1개
채택된 답변
+20 포인트
10년 전
페이스북이 지난 달부터 권한을 허가제로 변경되었습니다.
권한 체크 후 권한 요청을 하셔야 할듯 싶습니다.
수고하세요.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인