Feeds with comment in Xamarin.Forms


I have been tasked with creating a discussion section/ Feeds with Xamarin.Forms.

I have looked for examples and found nothing.
I have to create a section of the app where Users can ask a question and other users can comment and/or like question. I basically want to create something like Facebook Feeds or Stackoverflow but must simpler.

I need some guidence as I am fairly new to Xamarin. I have Generated the Models, And I'm using Web Services. 


Any help will be appreciated.


Asked by:- IIShriyaII
0
: 284 At:- 9/23/2017 11:25:25 PM
Xamarin.Forms Xamarin






2 Answers
profileImage Answered by:- Vipin

I am not Xamarin Expert but as I understand you need to fetch data continuously(by taking 10 Data item at a time using paging) using your web service and Xamarin.Form, so here are few links which may help you

  1. https://blog.statusnotquo.com/2015/03/19/xamarin-forms-implementing-infinite-scroll-on-a-listview/ (Will help understand how to load data in you Xamarin.Form using Web service, Infinitely like facebook)
  2. http://www.codenutz.com/lac09-xamarin-forms-infinite-scrolling-listview/

Now the part applying of like's and comment, check this below link, which is fetching data from Instagram, 

http://www.c-sharpcorner.com/article/xamarin-forms-create-instagram-application/

for you instead of fetching data about likes/comments from Instagram  fetch it from your database using C# web service

The last part, to save data(Comments/Like) in database you can check this link for it

1. https://msdn.microsoft.com/en-us/magazine/mt736454.aspx
2. https://code.tutsplus.com/tutorials/an-introduction-to-xamarinforms-and-sqlite--cms-23020

With the help of above links, you can first try to get data infinitely in your Xamarin.Form using web service, then fetch Like/comments as in the Instagram example, after that try to save it in the database with the help of the last 2 links

let me know by commenting on answer, if this helps, thanks

1
At:- 9/24/2017 7:26:23 AM


profileImage Answered by:- IIShriyaII

Thank you for the help. 

Reguarding the saving comments and likes. I am not using a Sqlite DB. i would like to know how to save those comments to a question.

0
At:- 9/25/2017 6:13:59 PM
@Shriya as you have commented, "I am not using a SQLite DB", then which DB are you using? can you tell us also, what do you mean by "I would like to know how to save those comments to a question"?? I think you need to elaborate these points so other users can understand your question well, thanks 0
By : vikas_jk - at :- 9/26/2017 4:19:07 AM
I am using an SQL BD. I would like to know how would I link each comment to a respective comment? 1
By : IIShriyaII - at :- 9/26/2017 6:57:52 PM
Well I think you are using SQL DB, but whichever database you use linking tables is same, Create a Table named "Questions" with "Id" as its primary key, now create a Second Table about "CommentsOnQuestions", link it to question table by Creating Foreign Key(say "QPID") in Table "CommentsOnQuestions", link it to questions table "ID" as primary Key Now user can do as many comments as user wants, you need to fetch all comments related to a question using "Questions" table based on it's Primary key. For example, your need to fetch all comments of question with Id= 1, then you can fetch all Comments from table "CommentsOnQuestions" where "QPID=1" 0
By : vikas_jk - at :- 9/28/2017 8:10:03 AM





Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use

Related Articles

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly