1
我正在使用Facebook PHP SDK嘗試獲取頁面喜歡數量最多的照片,以便能夠用作「英雄照片」。邏輯上說,最喜歡&評論的照片是最有趣的。如何獲得最喜歡和評論的頁面照片?
但是,我能想到的唯一方法是緩慢和繁瑣。
有沒有比使用下面更好的方法?
1. Query the Graph API for the albums belonging to a Page
2. Query the Graph API for Photos in each Album
3. Add the likes & comments for each photo
4. Re-order the list of photos and return the best few
正如你可以看到它是一個相對較低的回報了大量的工作,但我想不出更好的方式返回給定頁面的最流行的照片。
有什麼建議嗎?