Open jeansebastienZ opened 3 years ago
Hi, can you provide an example code to recreate the issue?
Hello :
Here one widget for the example , as its the basic example you gave , i did not initially send the code , but here we go :
class footer extends StatefulWidget {
@override
_footerState createState() => _footerState();
}
class _footerState extends State<footer> {
FacebookPost fbp = FacebookPost();
var myPost = [];
void getFbPosts() async {
myPost = await fbp.getFbData('https://www.facebook.com/symeg971/posts');
}
Widget myWidget = Container();
@override
Widget build(BuildContext context) {
return
Container(
height: 1000,
width:1000,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: MediaQuery.of(context).size.height * 0.4,
child: Center(
child: RaisedButton(
child: Text('Press to get Post Data'),
onPressed: () async {
await getFbPosts();
setState(() {
myWidget = myList(myPost);
});
},
),
),
),
Expanded(flex: 1, child: myWidget)
],
),
);
}
}
Widget myList(var theList) {
print("frfrfrf" +theList.toString());
return ListView.separated(
separatorBuilder: (context, index) => Divider(
thickness: 1,
),
shrinkWrap: true,
itemCount: theList.length,
itemBuilder: (context, index) {
print(theList[index].imagesUrl);
var data = theList[index];
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
color: Color(0xFFF0F0F0),
child: ListTile(
title: Text(data.title),
subtitle: SizedBox(
height: 120,
width: 300,
child: ListView.separated(
separatorBuilder: (context, index) => VerticalDivider(
thickness: 1,
),
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: data.imagesUrl.length,
itemBuilder: (context, index) =>
Image.network(data.imagesUrl[index]),
),
),
),
));
});
}
Hey. I checked it out. Unfortunately, I could not recreate the issue. It worked fine for me. Without any errors. Is it possible that you are using this in flutter web and not on flutter android? If so, please note that the package is not yet ready for Flutter web version. You can follow this and this link to try and resolve that problem for web.
Hello , indeed i'm using flutter web but your package is listed as ready for WEB : https://i.ibb.co/tYdWGdS/Capture-d-e-cran-2021-02-25-a-17-42-09.png
.
Already looked at those solution , without any success . Thank you anyway .
same issue !
I'll be upgrading the package to better suit Flutter 2 as well as rewriting the code with a proper web scraping tool. Please hold on for 2 weeks as I have my exams going on.
Edit : I have been running into trouble as the few methods that I have been working on, have been shutdown by facebook on account of being 'not the right way' and I also ended up getting my account banned. Looks Like facebook has tightened its security and makes sure scraping is difficult to achieve. I will be thus discontinuing this package until further notice.
Hello ,
I'm unable to use your package due to an Error: XMLHttpRequest error.
My flutter channel :
Flutter (Channel master, 1.26.0-2.0.pre.335
Complete error :