- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用带有Processing/Java的Facebook4J,并且我正在尝试提取 friend 照片的信息。几个月前我使用过该代码,它运行良好,但现在它返回所有字段为 null。有人可以帮助解决这个问题吗?以下是我提取照片的方法:
User fbUser = facebook.getUser(userID);
ResponseList<Album> albums = facebook.getAlbums(userID);
String targetAlbumId = "";
imgArray = new ArrayList<PImage>();
for (Album album : albums) {
//Get the album ID if it matches the string
if (album.getName().equals("Cover Photos")) {
targetAlbumId = album.getId();
break;
}
}
//Get all the photos that correspond to that Album ID
//Create a string arraylist to store all the photo ID names
ResponseList<Photo> photos = facebook.getAlbumPhotos(targetAlbumId);
ArrayList<String> getPhotoId = new ArrayList<String>();
//Get all photos in high quality. Create an arraylist of all the photos,
//and an arraylist of all the photo IDs (to use later for getting their likes)
for (Photo photo : photos) {
URL highQuality = photo.getImages().get(0).getSource();
imgArray.add(loadImage(highQuality.toString()));
getPhotoId.add(photo.getId());
}
最佳答案
当您的应用使用 Graph API v2.0 或更高版本时,您将无法再访问 friend 的照片。
查看
All
friends_*
permissions have been removed.
关于java - Facebook4J friend 专辑照片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28089927/
我正在学习 zend 框架 2 教程应用程序。我已经设置了我的相册模块目录如下: 当我启动我的 MAMP 服务器时,我遇到了一个错误, fatal error :未捕获的异常“Zend\ModuleM
我想创建一个 Java Swing 相册,但我无法找到正确的方法。我认为应该创建两个ArrayList,一个用于存储照片对象,另一个用于存储按钮。 之后我应该找到一种方法将每个图像分配给按钮并将它们添
我在一个文件夹中备份了所有 mp3 文件。 会不会有一个 bash 命令来自动移动他们自己的即时创建的乐队专辑标题目录中的所有文件? 正如您在图片中看到的,破折号之前的第一个单词是艺术家姓名,然后是专
我想知道我是否可以获取 mp3 文件信息,如专辑名称、艺术家、存储在 mp3 文件中的图像等等?如果有办法做到这一点,请帮忙。顺便说一句:我创建了一个名为 Entagged 的 Java 库,但我
我正在为一个乐队制作一个 iPhone 应用程序,其中列出了该乐队的歌曲。当用户触摸歌曲旁边的按钮时,我想打开 iTunes 并显示该歌曲。目前我正在使用这段代码: [[UIApplication共享
我正在尝试发布到 Facebook 页面上的相册(我可以毫无问题地发布到墙上 - 我拥有所有权限)。 Facebook 图形 API 表示相册 ID 是援助的值(value)。但是网址看起来像:htt
我正在开发一个使用 Vue 构建的供个人使用的 PWA,其功能基本上与 YouTube Music 相同,而无需每月付费。 我设置了一个带有 REST API 的服务器,该服务器可以根据查询搜索 Yo
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 8 年前。
我只想要一段简单的代码,它可以从 mp3 文件中提供作者、专辑、年份、标题和流派。如果可以的话,以变量的形式,以便我可以使用它。我想做的就是让这些信息显示在标签中。例如。 lbl艺术家、lbl专辑、l
通过 1 为谁通过 ffmpeg 我需要合并 2 个音频并向其添加图片(专辑) 1-audio 2-audio output https://superuse
我仅使用 youtube-dl 从 youtube 视频中提取音频. 我想在下载后将元数据(即艺术家姓名和歌曲名称、年份、专辑、持续时间、流派)写入 mp3/m4a 文件。 我的尝试是从以下代码开始的
我是一名优秀的程序员,十分优秀!