I want to implement like and unlike functionality with likes count in website like instagram. But the website has no user login. It is open to all. So how can I implement this functionality? Please also provide references with your answer.
Related
I am new to the world of web development. I know how to use PHP and so I can do that just fine, but I am a little behind on "modern practices". Last night I went ahead and used the LightOpenID library with CodeIgniter to create a login section on my website. The user clicks log in which takes them to a login page with a Google "log in" button. That button uses the URL generated by LightOpenID to direct the user to the Google "Account selection" page which asks for permissions/etc. It then redirects the user to my website where I write their details to the database for future use - like a "silent registration feature". I store their first name, last name, email and OpenID. I then create a session for the user and the user can now browse my website. Super simple.
The reason I felt like I should explain that is because I wanted to point out how "little" I want to utilize the users account. I just need them to sign in with Google for authentication. Google's OpenID>oauth2 migration page and all of their migration examples (which are a little beyond me) explain Google+ authentication for the purpose of retrieving a users friend circles and other social junk. I don't need anything this complicated, all I need is authentication.
So I was wondering what method I should be using now instead (Google says use oauth 2, but not "early oauth 2".. I have no idea what the difference is. They also say that I should only use Google+ now) and I am wondering if you guys can help me find a simple library that handles authentication for me
Have a look at HybridAuth, it works with Google, Facebook, Twitter, etc...
I've researched really a lot, but found no way to embed a share button which posts directly on the fanpage, not the personal profile.
I'm working with the JS API and also tried the direct link, neither worked. There is also no way to change account directly in the popup. Settings the publisherid also didn't work.
Is there any way to embed a share button which will share something on my fanpage?
That's nothing you as the website owner can take influence on. It depends on how the user is logged in on Google+.
As a page owner you can create a username/password for the page and login as the page on Google+. Here is a post describing that: https://plus.google.com/108210288375340023376/posts/8nmNsfL8G2R
I'm aware I can use the ShareLinkTask class to share something on my favourite social network. I'm trying to add a button to share on twitter only. I don't want to enable the user to chose.
I can't find a workaround for that class, is it possible to do that?
There are many ways to share something with social networks. Few are:
ShareLinkTask
User will not have to SIgnIn, but would be presented with many networks.
External Browser Mechanism (Recommended)
You can launch a popup with BrowserControl in it and redirect it to URL of form
https://twitter.com/intent/tweet?text=your-tweet-text&url=http://google.com.
User will be asked to SIgnIN with all text filled and ready to Tweet, as shown (Desktop Browser)
Dedicated WP Libraries such as TweetSharp, LINQtoTwitter n others.
These will require you to use API 1.1 and send OAuth authenticated requests. Its a little comples if you only want Share capability.
It is not possil using the ShareLinkTask. You need to implement it by yourself, e.g: using TweetSharp.
I implemented codeigniter Ion_Auth library for user registration and etc. I noticed it does not have a built-in user manager such as edit user accounts. Does a user manager such as edit user accounts exist? I can always code one, but I rather not reinvent the wheel.
I use Ion Auth too, it is pretty well coded I and I like writing code with it.
I also needed users editing, but I find it quite easy, because I needed only one simple form, because the library has update_user() and you need only to pass an array with your new data.
Download a CMS because it looks to me you have little or no experience with codeigniter or php for that matter. I dont mean that in a rude way by any means but if you cant perform simple CRUD operations, install a pre-built system as it will save you lots of headaches.
I've just started using CI and am also using Ion Auth for authentication. I'm handling user signup/authentication exclusively with ion auth and extending public profiles using Grocery CRUD. All public info can be viewed globally, but only edited by the user that owns it (as defined by linking the ion auth user table to the extended profile table). I don't know if this is the best way to do it, but it is what I'm doing so far.
I was wondering if anyone can shed some light on setting up basic user authentication. I've installed the admin app into my project and it works great. But I need a basic user role that can have it's own registration page etc.
I need to see something like
domain.com/users/user.slug
would take them to their profile page
I'm also going to have nested resources, so a user can have a project associated to them.
domain.com/users/user.slug/projects/project.slug
or
domain.com/users/user.slug/project.slug
The admin piece worked great, but I have no idea how to setup registration etc for a user model?
I've used devise in the past with Rails and I'm wondering if anything like it currently exists? I've seen some discussion around warden. Is there a defacto solution that people are using or am I able to implement the admin app to handle this? Right now /accounts is protected and can only be accessed by the admin role.. so I can't have users go to accounts/new
Thanks
For now I basically just copied the admin app.. into my own Users app while using my own User model.
The user model is basically a direct port of the account model.. as is the session controller etc. Just switched the model names around.
I'm still not sure if this is the best approach or if I'm able to leverage the admin app to handle this also?
This solution is working, though again, I'm not sure if it's the optimal approach.