如何解决Facebook检测到Believer没有使用安全连接来传输信息
好吧,我尝试添加登录并使用Facebook功能进行注册,当我单击Facebook登录时,它带我到Facebook,但显示诸如以下错误 Facebook已发现Believer没有使用安全连接来传输信息。 在Believer更新其安全设置之前,您将无法使用Facebook登录。
我为社交应用添加的那些行使用了注释。这段代码来自我的project / settings.py
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.Scanner;
@SuppressWarnings("unchecked") //was the only way to stop the error: "Type safety: Unchecked cast from Object to HashMap<String,Song>" from happening
public class Main {
public static void main(String[] args) throws FileNotFoundException,IOException,ClassNotFoundException {
// Map of songs
HashMap<String,Song> playList = new HashMap<String,Song>();
// getting file name where it is stored
Scanner input = new Scanner(System.in);
System.out.print("Enter the file name you stored/will store your playlist in: ");
String fileName = input.nextLine();
input.close();
File file = new File(fileName);
ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file))); //using output streams to find the file requested by user
if (file.length() == 0) {
out.writeObject(playList);
//System.out.println("Wrote playlist"); //debug
} //sees if there is nothing in the file,and if there is nothing,writes a blank HashMap to it
ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file))); //This is where the EOFException is taking place. In the if statement above,it tests if the file is empty. Since playlist.dat is empty,it will attempt to write an empty HashMap playlist to the file,but since there is an EOFException and playlist.dat is empty,it is clearly not doing this.
playList = (HashMap<String,Song>) in.readObject();
System.out.println("Opening playlist at " + fileName + "."); //debug
in.close();
/* other code continues this way... */
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。