1

I am working on an application in Flutter for a client. They are wanting to promote their Facebook page for their business, the page is open to the public and doesn't require login. On their site, they're already using the Facebook Social Plugin to promote their Facebook feed. I am wanting to use the Social Plugin or something similar to it for consistency.

I have tried grabbing the iFrame from Facebook's Social Plugin creation page and hosting it in a WebView via Flutter. The problem is this leads to a bunch of different errors and a repeated Attempt to remove non-JNI local reference, dumping thread console log. I already know that the WebView wasn't built to handle an iFrame like this, but I don't know where else to turn in-order to view the Facebook Page. I have also tried to just display the URL link in the WebView without any of the HTML tags and had no luck. Any suggestions?

Lonely Twinky
  • 435
  • 1
  • 6
  • 17
  • Although I never used the plugin, can you just launch it into the facebook app? https://pub.dev/packages/flutter_appavailability – user1462442 Aug 30 '19 at 21:03
  • @user1462442 as much as I would like to just do that for simplicity, the clients want the page plugin integrated into the application so that you can view the timeline without switching to another app or web browser. – Lonely Twinky Aug 30 '19 at 21:11
  • Good luck reviewing the issue page https://github.com/flutter/flutter/issues/730 – user1462442 Aug 30 '19 at 21:14

1 Answers1

0

You can simply use webview_flutter plugin to display the web page on a Flutter app. Note that webview_flutter plugin is yet to have support for web. If you're also planning to deploy your app for web, what I did was I rendered the page using HtmlElementView, following this post.

Omatt
  • 8,564
  • 2
  • 42
  • 144